// Start is called before the first frame update
 void Start()
 {
     rl = GameObject.Find("TankSelector").GetComponent <TankSelection>();
     if (rl.tankNumber == 1)
     {
         CreateMortar();
     }
     if (rl.tankNumber == 2)
     {
         CreateScout();
     }
 }
Exemple #2
0
 void Awake()
 {
     if (this.CompareTag("Selector") == true)
     {
         if (instance == null)
         {
             instance = this;
             DontDestroyOnLoad(gameObject);
         }
         else if (instance != this)
         {
             Destroy(gameObject);
         }
     }
 }
Exemple #3
0
 // Start is called before the first frame update
 void Start()
 {
     ts = GameObject.Find("TankSelector").GetComponent <TankSelection>();
     ChangeImage();
 }