Ejemplo n.º 1
0
 void DisableMainPlayer()
 {
     if (MainAnimal == this)
     {
         MainAnimal = null;
         OnMainPlayer.Invoke(isPlayer.Value = false);
     }
 }
Ejemplo n.º 2
0
        /// <summary>Set an Animal as the Main Player and remove the otherOne</summary>
        public virtual void SetMainPlayer()
        {
            if (MainAnimal)
            {
                MainAnimal.isPlayer.Value = false;
                MainAnimal.OnMainPlayer.Invoke(false);
            }

            this.isPlayer.Value = true;
            MainAnimal          = this;
            OnMainPlayer.Invoke(true);
        }