Пример #1
0
 private void OnInfection(Infection infection)
 {
     if (infection.Host == MyInfoManager.Instance.Seq)
     {
         localController.Heal(0.2f);
     }
     if (infection.NewZombie == MyInfoManager.Instance.Seq && ZombieVsHumanManager.Instance.IsZombie(MyInfoManager.Instance.Seq))
     {
         MakeZombie();
         if (ZombieVsHumanManager.Instance.GetHumanCount() > 0)
         {
             newZombie      = true;
             deltaNewZombie = 0f;
         }
     }
 }
Пример #2
0
    public bool Heal(int inc)
    {
        bool result = false;

        if (IsEnable())
        {
            GameObject gameObject = GameObject.Find("Me");
            if (null != gameObject)
            {
                LocalController component = gameObject.GetComponent <LocalController>();
                if (null != component && component.Heal(inc))
                {
                    result = true;
                    Use();
                }
            }
        }
        return(result);
    }