Exemple #1
0
 public void Summon(string s)
 {
     //GameObject deviceGO = GameManager.Instance.deviceGO;
     //get a random pos from gird;
     try
     {
         SpawnGrid sg        = GetGrid(ssHandler.Obersvers);
         Vector3   pos       = sg.GetPos();
         Vector3   offsetPos = deviceGO.transform.position;
         //instantiate and set the value of bullet obj
         var spawnGO = Instantiate(monsterGo, pos, Quaternion.identity);
         spawnGO.transform.localScale = new Vector3(1, 1, 1);
         spawnGO.SendMessage("OccupyGrid", sg);
         monsters.Add(spawnGO);
     }
     catch (System.Exception e)
     {
         Debug.Log(e.StackTrace);
     }
 }
Exemple #2
0
 void TestFollowSG()
 {
     transform.position = sg.GetPos();
 }