コード例 #1
0
 // Use this for initialization
 void Start()
 {
     Instance = this;
     RestartButton.SetActive(false);
     re = RestartButton;
     qu = QuitButton;
 }
コード例 #2
0
 private void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag == "zombie")
     {
         if (Hp <= 0)
         {
             Destroy(gameObject);
             HpNum.text           = "" + 0;
             KillNum              = 0;
             GamerFunction.isPlay = false;
             GamerFunction.PlayerDead();
         }
         else
         {
             Hp        -= ZombieFunction.attack;
             HpNum.text = "" + Hp;
         }
     }
 }