// Use this for initialization void Start() { objs = new GameObject[10]; healths = new HPController[10]; distance = new float[10]; controller = game_control.GetComponent <Game_controller> (); prestate = controller.State; clear(); can_bomb = true; objs[0] = GameObject.Find("player1"); objs[1] = GameObject.Find("player2"); objs[2] = GameObject.Find("player3"); objs[3] = GameObject.Find("player4"); objs[4] = GameObject.Find("player5"); objs[5] = GameObject.Find("enemy1"); objs[6] = GameObject.Find("enemy2"); objs[7] = GameObject.Find("enemy3"); objs[8] = GameObject.Find("enemy4"); objs[9] = GameObject.Find("enemy5"); for (int i = 0; i < 10; i++) { healths[i] = objs[i].GetComponent <HPController>(); } }
void Start() { controller = GameObject.FindGameObjectWithTag("GameController").GetComponent <Game_controller>(); people = GameObject.FindGameObjectWithTag("GameController").GetComponent <People>(); weapons = GameObject.FindGameObjectWithTag("GameController").GetComponent <Weapon>(); control = GameObject.FindGameObjectWithTag("GameController").GetComponent <Control>(); peoples = people.GetPeople(); state = player_state.begin; }
private void Start() { audit = gameObject.GetComponent <AudioSource>(); GameObject contr = GameObject.Find("Game_logick"); if (contr != null) { controller = contr.GetComponent <Game_controller>(); } }
// Use this for initialization void Awake() //called before start { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } }
// Use this for initialization void Start() { controler = GameObject.FindGameObjectWithTag("GameController").GetComponent <Game_controller> (); // Debug.Log (mini_map.transform.position); screen_width = Screen.width; screen_height = Screen.height; map_width = mini_map.transform.position.x * 2; map_height = (screen_height - mini_map.transform.position.y) * 2; frame_height = map_height * 8.0f / 14.0f; frame_weight = map_width / 2.0f; }
// Use this for initialization void Start() { GameObject G = GameObject.FindWithTag("GameController"); if (G != null) { gc = G.GetComponent <Game_controller> (); } if (gc == null) { } }
// Use this for initialization void Start() { controller = GameObject.FindGameObjectWithTag("GameController").GetComponent <Game_controller>(); people = GameObject.FindGameObjectWithTag("GameController").GetComponent <People>(); supply = GameObject.FindGameObjectWithTag("GameSupply").GetComponent <Supply>(); weapons = GameObject.FindGameObjectWithTag("GameController").GetComponent <Weapon>(); peoples = people.GetPeople(); weapon_value[0] = 6; //small weapon_value[1] = 10; //big weapon_value[2] = 5; //time weapon_value[3] = 4; //move weapon_value[4] = 4; //bird weapon_value[5] = 3; //cannon for (int i = 0; i < 6; i++) { weapon_value_now[i] = 0; } for (int i = 0; i < 6; i++) { value[i] = 0.0f; } }
// Use this for initialization void Start() { controller = GameObject.FindGameObjectWithTag("GameController").GetComponent <Game_controller>(); SupplyPlaneRigidbody = gameObject.GetComponent <Rigidbody2D>(); SupplyPlane.SetActive(false); }
// Use this for initialization void Start() { gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <Game_controller> (); text = this.GetComponent <TextMesh>().text; }
public void setGameControllerReference(Game_controller controller) { gameController = controller; }
void Awake() { _instance = this; }
// Use this for initialization void Start() { gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <Game_controller> (); }