Ejemplo n.º 1
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("BattleGroup"))
     {
         BattleGroupController tempBg = collision.gameObject.GetComponent <BattleGroupController>();
         if (touchingBattleGroups.Contains(tempBg))
         {
             touchingBattleGroups.Remove(tempBg);
         }
     }
 }
Ejemplo n.º 2
0
    public void SpawnBattleGroup()
    {
        if (stationType == StationType.HomeBase)
        {
            GameObject            tempBG  = Instantiate(battleGroupPrefab, transform.position, Quaternion.Euler(Vector3.zero));
            BattleGroupController tempBGC = tempBG.GetComponent <BattleGroupController>();
            tempBGC.Initialize(this, team, battleGroupsSpawned);

            battleGroupsSpawned++;

            battleGroups.Add(tempBGC);
        }
    }
Ejemplo n.º 3
0
 public void Initialize(BattleGroupController bg)
 {
     BGController = bg;
     img.color    = bg.GetColor();
     nameTxt.text = "BG\n" + bg.tagNumber;
 }