Esempio n. 1
0
 public PathFinder()
 {
     cells           = CellManager.GetInstance();
     selectedUnit    = UnitSelection.GetInstance();
     units           = UnitsList.GetInstance();
     playerControler = PlayerControler.GetInstance();
 }
Esempio n. 2
0
 public static UnitsList GetInstance()
 {
     if (instance == null)
     {
         instance = new UnitsList();
     }
     return(instance);
 }
Esempio n. 3
0
 public static bool WinCheck()
 {
     if (CellManager.GetInstance().EnemyPortalCount() == 0 && UnitsList.GetInstance().GetAllEnemies().Length == 0)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 4
0
 private void Awake()
 {
     cellManager = CellManager.GetInstance();
     unitsList   = UnitsList.GetInstance();
     pathFinder  = PathFinder.GetInstance();
     attackPower = basicAttackPower;
     health      = maxHealth;
     isActive    = false;
     state       = UnitState.IDLE;
     statHUD.SetHUDText(health.ToString());
     audio = GetComponent <AudioSource>();
 }
Esempio n. 5
0
 private void Start()
 {
     unitsList     = UnitsList.GetInstance();
     unitSelection = UnitSelection.GetInstance();
     pathFinder    = PathFinder.GetInstance();
 }
Esempio n. 6
0
 private void Awake()
 {
     cellSelection = CellSelection.GetInstance();
     unitsList     = UnitsList.GetInstance();
     unitSelection = UnitSelection.GetInstance();
 }