void Start() { Debug.Log("Start"); m_Rigidbody = gameObject.GetComponent <Rigidbody>(); m_AudioSource = gameObject.GetComponent <AudioSource>(); m_GameController = GameObject.FindWithTag("GameController").GetComponent <GameControllor>(); m_UIController = GameObject.Find("UI").GetComponent <UIController>(); }
private void Awake() { if (singelton != null) { Destroy(this.gameObject); } singelton = this; }
// Use this for initialization void Start() { m_Rigidbody = gameObject.GetComponent <Rigidbody>(); m_Transform = gameObject.GetComponent <Transform>(); m_GameController = GameObject.FindWithTag("GameController").GetComponent <GameControllor>(); m_UIController = GameObject.Find("UI").GetComponent <UIController>(); m_direction = m_Transform.forward; //Invoke("SendBullet", 2.0f); //StartCoroutine(SendBullet()); }
// Use this for initialization void Start() { m_GameStart = GameObject.Find("GameStart"); m_GameOver = GameObject.Find("GameOver"); m_GameWin = GameObject.Find("GamePass"); m_GameLose = GameObject.Find("GameFailed"); //m_Player = GameObject.Find("player"); //m_Player = null; m_GameController = GameObject.FindWithTag("GameController").GetComponent <GameControllor>(); m_GUITextSocre = GameObject.Find("GameScore").gameObject.GetComponent <GUIText>(); ChangeGameStatus(GAMESTATUS.GAMESTART); ShowScore(); }
public void ResetItems() { GameControllor gc = GameControllor.singelton; int pI = 0 + gc.plazed.Count; for (int i = 0; i < pI; i++) { GameObject gobj = gc.plazed[0]; gc.objects.Remove(gobj.transform.position); gc.plazed.Remove(gobj); Destroy(gobj.gameObject); } foreach (var item in GameControllor.singelton.Items) { item.resetAmount(); } foreach (var b in buttons) { b.UpdateCount(); } }
// Use this for initialization void Start() { Destroy(gameObject, 8.0f); m_GameController = GameObject.FindWithTag("GameController").GetComponent <GameControllor>(); m_UIController = GameObject.Find("UI").GetComponent <UIController>(); }