示例#1
0
 protected override void PlayTargetEffects(FightingEntity user, List <FightingEntity> targets)
 {
     user.PlaySound(effectSoundName);
     foreach (FightingEntity target in targets)
     {
         if (target != null && target != user)
         {
             InstantiateHitEffect(target);
         }
     }
 }
示例#2
0
 protected virtual void PlayTargetEffects(FightingEntity user, List <FightingEntity> targets)
 {
     if (shakeStrength != ShakeStrength.NONE)
     {
         GameManager.Instance.battleComponents.GetCameraController().Shake(shakeStrength);
     }
     user.PlaySound(effectSoundName);
     foreach (FightingEntity target in targets)
     {
         if (target != null)
         {
             InstantiateHitEffect(target);
             TargetFlash(target);
             target.PlaySound("hit");
         }
     }
 }
示例#3
0
    public virtual ActionChoiceResult TryChooseAction(FightingEntity user, string[] splitCommand)
    {
        ActionChoiceResult res = new ActionChoiceResult();

        if (CheckKeyword(splitCommand.Length == 0 ? "" : splitCommand[0], res) &&
            CheckArgQuantity(splitCommand.Length - 1, user, res) &&
            CheckCost(user, res) &&
            CheckValidTarget(user, splitCommand, res))
        {
            res.SetState(ActionChoiceResult.State.QUEUED);
            res.AddMessage(string.Format(Messages.QUEUED_MOVE, name, description));
            QueueAction(user, splitCommand);
            user.PlaySound("confirm"); //TODO: Look towards consolidating use here
        }

        return(res);
    }
示例#4
0
    public IEnumerator AnimateAction(FightingEntity user, List <FightingEntity> targets)
    {
        // Perform user's animation
        user.PlaySound("action");
        AnimateUser(user);
        AnimateParticleEffects(user, targets);
        yield return(GameManager.Instance.time.GetController().WaitForSeconds(_timeBeforeEffect));

        if (delayHitEffects)
        {
            yield return(GameManager.Instance.time.GetController().WaitForSeconds(0.05f));
        }

        // Perform hit sounds and visuals on target(s)
        PlayTargetEffects(user, targets);
        yield return(GameManager.Instance.time.GetController().WaitForSeconds(_timeAfterEffect));
    }