public override void OnEvent(PlayerHit evnt)
 {
     if (!_totemOwnership)
     {
         _totemOwnership = TotemHelpers.GetTotemComponent();
     }
     if (_totemOwnership && evnt.VictimID == _totemOwnership.LocalOwnerID) // The totem owner has been hit
     {
         OnTotemLost.Invoke();
     }
 }
Пример #2
0
        // PUBLIC

        public void MapInputs()
        {
            if (Enabled)
            {
                if (Input.GetButtonDown(Constants.Input.UseItem) ||
                    Input.GetButtonDown(Constants.Input.UseItemForward) ||
                    Input.GetButtonDown(Constants.Input.UseItemBackward))
                {
                    if (!_totemOwnership)
                    {
                        _totemOwnership = TotemHelpers.GetTotemComponent();
                    }
                    if (_totemOwnership)
                    {
                        ThrowTotem();
                    }
                }
            }
        }