示例#1
0
 public override void Aggro()
 {
     if (wanderState.enabled)
     {
         OnAggro?.Invoke();
         entityScript.Growl();
         Chase();
     }
 }
示例#2
0
    private void OnTriggerEnter(Collider other)
    {
        var player = other.GetComponent <PlayerMovement>();

        if (player != null)
        {
            Debug.Log("Aggrod");
            OnAggro?.Invoke(player.transform);
        }
    }
示例#3
0
        static EntityEvents()
        {
            var fragment = Platform.CoreFragment?.GetEntityEventsFragment() ?? throw Platform.FragmentException();

            fragment.Notify                      = args => OnNotify.SafeInvoke(args);
            fragment.PlayAnimation               = args => OnPlayAnimation.SafeInvoke(args);
            fragment.ProcessSpellCast            = args => OnProcessSpellCast.SafeInvoke(args);
            fragment.DoCast                      = args => OnDoCast.SafeInvoke(args);
            fragment.NewPath                     = args => OnNewPath.SafeInvoke(args);
            fragment.IssueOrder                  = args => OnIssueOrder.SafeInvoke(args);
            fragment.Teleport                    = args => OnTeleport.SafeInvoke(args);
            fragment.Aggro                       = args => OnAggro.SafeInvoke(args);
            fragment.BuffAdd                     = args => OnBuffAdd.SafeInvoke(args);
            fragment.BuffRemove                  = args => OnBuffRemove.SafeInvoke(args);
            fragment.LevelUp                     = args => OnLevelUp.SafeInvoke(args);
            fragment.SpellbookCastSpell          = args => OnSpellbookCastSpell.SafeInvoke(args);
            fragment.SpellbookStopCast           = args => OnSpellbookStopCast.SafeInvoke(args);
            fragment.SpellbookUpdateChargedSpell = args => OnSpellbookUpdateChargedSpell.SafeInvoke(args);
            fragment.OnIntegerPropertyChange     = args => OnIntegerPropertyChange.SafeInvoke(args);
            fragment.OnFloatPropertyChange       = args => OnFloatPropertyChange.SafeInvoke(args);
        }