ExtensionBool.cs 261 B

123456789101112131415161718
  1. using UnityEngine;
  2. using System.Collections;
  3. public static class ExtensionBool
  4. {
  5. public static int ToInt(this bool boolean)
  6. {
  7. if (boolean)
  8. {
  9. return 1;
  10. }
  11. else
  12. {
  13. return 0;
  14. }
  15. }
  16. }