示例#1
0
    void OnAbilityHit(AbilityHitEventInfo abilityHitEventInfo)
    {
        Debug.Log("AnimationController Alerted to Ability Hit!");

        // Reponse animations will be based on 'AbilityDamageType' e.g. Fire, lightning etc
        // But.... this is not implemented yet. Also it will be partical effects, and not animations belonging to the character target.
        // All monsters will have a default GetHit animation for any and all edge cases
        if (abilityHitEventInfo.ability.GetEffectList().Any(c => c.abilityType == AbilityType.DirectDamage))
        {
            abilityHitEventInfo.UnitGO.GetComponent <Animator>().SetTrigger("OnGetHit");
        }
    }
示例#2
0
 public void UnregisterEventCallbacks()
 {
     UseAbilityEventInfo.UnregisterListener(OnAbilityUsed);
     AbilityHitEventInfo.UnregisterListener(OnAbilityHit);
 }
示例#3
0
 void RegisterEventCallbacks()
 {
     UseAbilityEventInfo.RegisterListener(OnAbilityUsed);
     AbilityHitEventInfo.RegisterListener(OnAbilityHit);
 }