Exemplo n.º 1
0
 public void Barrier(Image image)
 {
     if (image.color == Color.gray)
     {
         return;
     }
     if (UseSkill_Barrier || mainGame.Money < 500)
     {
         return;
     }
     mainGame.Money  -= 500;
     UseSkill_Barrier = true;
     object[] param = new object[2] {
         image, 15.0f
     };
     StartCoroutine(MainGame.CoolDown(param));
     StartCoroutine(CoolDown((x) => { UseSkill_Barrier = x; }));
 }
Exemplo n.º 2
0
    public void Spawn(Image LV)
    {
        if (LV.color == Color.gray)
        {
            return;
        }

        GameObject unit = mainGame.AddUnit(int.Parse(LV.name.Split('r')[1]));

        if (unit != null)
        {
            unit.transform.position = spawnPoint.transform.position;
            Camera.main.GetComponent <SpawnTower>().SpawnUnitcount++;
            unit.transform.SetParent(GameObject.Find("Players").transform);
            object[] param = new object[2] {
                LV, 2.0f
            };
            StartCoroutine(MainGame.CoolDown(param));
        }
    }