void OnPhotonPlayerDisconnected(PhotonPlayer player) { Debug.Log("OnPhotonPlayerDisconnected: " + player); /** * add I won, */ Debug.Log("I won"); manager_script manager = GameObject.Find("the game").GetComponent <manager_script>(); manager.won(PhotonNetwork.player.ID); }
// Use this for initialization void Start() { Debug.Log("created " + gameObject.name); wind_str = GameObject.Find("wind").GetComponent <wind>().wind_str; pixel_cnr = GameObject.Find("ground").GetComponent <pixel_control>(); game_manager = GameObject.Find("the game").GetComponent <manager_script>(); Debug.Log(game_manager); GameObject the_game = GameObject.Find("the game"); text_game_obj = GameObject.Find("bullet_text"); transform.parent = the_game.transform; rigid = GetComponent <Rigidbody2D>(); if (bullet_type == bullet_type_e.grenade) { text = text_game_obj.GetComponent <Text>(); timer_coroutine = counter(); StartCoroutine(timer_coroutine); } }
// Use this for initialization void Start() { wind_str = GameObject.Find("wind").GetComponent<wind>().wind_str; pixel_cnr = GameObject.Find("ground").GetComponent<pixel_control>(); game_manager = GameObject.Find("the game").GetComponent<manager_script>(); }
// Use this for initialization void Start() { game_manager = GameObject.Find("the game").GetComponent <manager_script>(); game_manager.follow_bullet(this.gameObject); }
// Use this for initialization void Start() { current_hp = hp; manager = GameObject.Find("the game").GetComponent <manager_script>(); }