Esempio n. 1
0
 void GetFortune(Notification noti)
 {
     FortuneManager.Fortune_base fb = (FortuneManager.Fortune_base)noti.data;
     HP += fb.Rescue;
     if (HP >= HPLimited)
     {
         HP = HPLimited;
     }
     AddAttack += fb.AddAttack;
     if (AddAttack >= 0.5)
     {
         AddAttack = 0;
         NotificationCenter.DefaultCenter().PostNotification(this, "PlayerFightingAddAttack");
     }
 }
Esempio n. 2
0
    private void OnDestroy()
    {
        FortuneManager.Fortune_base fb = new FortuneManager.Fortune_base();
        fb.S = transform.position;
        if (RT == RobotType.FlyingSlow || RT == RobotType.GroundSlow)
        {
            fb.Rescue = 10;
        }
        else
        {
            fb.AddAttack = 0.05f;
        }

        NotificationCenter.DefaultCenter().PostNotification(this, "InstantiateFortune", fb);
    }