public void Charge(OnPointTargetCastEventData e)
 {
     //such that the skill cannot be cast again if already in motion
     if (!IsCharging)
     {
         Caster       = e.Caster;
         ColorShifter = Caster.GetComponentInChildren <ColorShifter>();
         if (ColorShifter == null)
         {
             Debug.LogWarning("No `ColorShifter` shifter component found when attempting to use charge skill");
         }
         MovableBody = Caster.GetComponentInChildren <MovableBody>();
         if (MovableBody == null)
         {
             throw new MissingComponentException(
                       "No `MovableBody` component found on caster when attempting to use charge skill"
                       );
         }
         Target = e.Target;
         Origin = e.Caster.transform.position;
         StartCharging(
             e.Stats.GetValue("ChargeDuration") + 0.33f,
             e.Stats.GetValue("ChargeBonusSpeed") + 2f,
             e.Stats.GetValue("ChargeBonusAcceleration") + 10f
             );
     }
 }
    public void Cast(OnPointTargetCastEventData e)
    {
        StatusCollection statusCollection =
            e.Caster.GetComponentInChildren <StatusCollection>();

        if (statusCollection != null)
        {
            Status posionStatus = Instantiate(PosionStatus);
            statusCollection.AddStatus(posionStatus);
            posionStatus.Emitter.Emit(
                new OnStatusStartEventData(e.Caster, gameObject, 3f)
                );
        }
    }
Beispiel #3
0
 public void Emit(OnPointTargetCastEventData e)
 {
     Handler.OnPointTargetCast.Invoke(e);
 }