示例#1
0
    public void EmitDamageEffect(DamagePack damagePack)
    {
        string      debugMessage = "";
        DamagedType damagedType  = damagePack.damaged.damageType;

        if (RedirectionEvents.ContainsKey(damagedType))
        {
            DamagerType damagerType = damagePack.damager.damagerType;
            if (RedirectionEvents[damagedType].ContainsKey(damagerType))
            {
                RedirectionEvents[damagedType][damagerType](damagePack);
                return;
            }
            debugMessage = damagedType + " has no VFX function for " + damagerType + " loaded. Please add this.";
        }
        else
        {
            debugMessage = damagedType + " has no VFX functions loaded. Please add them.";
        }
        Debug.LogFormat("<color=#0000FF>" + debugMessage + "</color>");
    }
示例#2
0
 public void Set(float damage, DamagerType damagerType, Vector3 impactDirection)
 {
     this.damage          = damage;
     this.damagerType     = damagerType;
     this.impactDirection = impactDirection;
 }