Example #1
0
    public static FightWin create()
    {
        GameObject Perfab     = Resources.Load("Prefab/Fight/fightResult") as GameObject;
        GameObject gameObject = Instantiate(Perfab, new Vector3(Screen.width * 0.5f, Screen.height * 0.5f, 0), new Quaternion(0, 0, 0, 1)) as GameObject;
        FightWin   msgObj     = gameObject.gameObject.AddComponent <FightWin>();

        return(msgObj);
    }
Example #2
0
 public void subHp(int _hp)
 {
     this.hp = this.hp - _hp;
     if (this.hp <= 0)
     {
         FightWin.create();
     }
 }