Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     if (player == null)
     {
         GameObject obj = GameObject.FindGameObjectWithTag("Player");
         if (obj != null)
         {
             player = obj.GetComponent <Player_Ctrl>();
         }
     }
 }
Exemplo n.º 2
0
 public void Clear()
 {
     if (PlayEnd != true)
     {
         Time.timeScale    = 0;
         PlayEnd           = true;
         FinalMessage.text = "Clear!!";
         Player_Ctrl PC    = GameObject.Find("Player").GetComponent <Player_Ctrl>();
         float       score = 12345f + Limit_Time * 123f + PC.hp * 123f;
         FinalScoreLabel.text = string.Format("{0:N0}", score);
         FinalGUI.SetActive(true);
         BestCheck(score);
     }
 }
Exemplo n.º 3
0
    public void GameOver()
    {
        if (PlayEnd != true)
        {
            Time.timeScale    = 0f;
            PlayEnd           = true;
            FinalMessage.text = "Fail...";
            float score = 1234f + Enemy_Count * 123f;
            FinalScoreLabel.text = string.Format("{0:N0}", score);

            FinalGUI.SetActive(true);
            BestCheck(score);
            Player_Ctrl PC = GameObject.Find("Player").GetComponent <Player_Ctrl>();
            PC.PS = PlayerState.Dead;
        }
    }
Exemplo n.º 4
0
 // Use this for initialization
 void Awake()
 {
     Instance = this;
 }