void spawnCar() { GameObject g = Network.Instantiate(carPrefab, spawnLocation.position, spawnLocation.rotation, 0) as GameObject; g.name = "Player" + i; i++; Network.Instantiate(camera, Vector3.zero, Quaternion.identity, 0); UIManager_Game script = GameObject.FindObjectOfType <UIManager_Game> (); script.Init(); }
public void removeWeapon(int num) { this.weapon[num].enabled = false; UIManager_Game.SetWeaponEnabled(num, false); for (int i = 0; i < MAXSLOT; i++) { if (this.weaponslot[i] == num) { this.weaponslot[i] = -1; //return; } } }
public void addWeapon(int num) { this.weapon[num].enabled = true; UIManager_Game.SetWeaponEnabled(num, true); for (int i = 0; i < MAXSLOT; i++) { if (this.weaponslot[i] == -1) { this.weaponslot[i] = num; //add = true; return; } } }
void Awake() { instance = this; }
void Start() { uiManagerGame = GameObject.Find (GameConstants.gameUI).gameObject.GetComponent<UIManager_Game> (); }