Exemple #1
0
        public IEnumerator <YieldInstruction> ProcessEndAnim(Character user, Character target, BattleData data)
        {
            //trigger animations of target
            if (data.HitCharAnim != 0)
            {
                StaticCharAnimation charAnim = CharAnimation.GetCharAnim(data.HitCharAnim);
                charAnim.AnimLoc = target.CharLoc;
                charAnim.CharDir = target.CharDir;
                yield return(CoroutineManager.Instance.StartCoroutine(target.StartAnim(charAnim)));
            }


            //play battle FX
            foreach (BattleFX fx in data.IntroFX)
            {
                yield return(CoroutineManager.Instance.StartCoroutine(ProcessBattleFX(user, target, fx)));
            }

            //play sound
            GameManager.Instance.BattleSE(data.HitFX.Sound);
            //the animation
            FiniteEmitter endEmitter = (FiniteEmitter)data.HitFX.Emitter.Clone();

            endEmitter.SetupEmit(target.MapLoc, user.MapLoc, target.CharDir);
            CreateAnim(endEmitter, DrawLayer.NoDraw);
            SetScreenShake(new ScreenMover(data.HitFX.ScreenMovement));
            yield return(new WaitForFrames(GameManager.Instance.ModifyBattleSpeed(data.HitFX.Delay, target.CharLoc)));
        }
Exemple #2
0
 public void PickUpFrom(MonsterID appearance, CharAnimation prevAnim)
 {
     AnimRushTime   = GraphicsManager.GetChara(appearance).GetRushTime(AnimFrameType, CharDir);
     AnimHitTime    = GraphicsManager.GetChara(appearance).GetHitTime(AnimFrameType, CharDir);
     AnimReturnTime = GraphicsManager.GetChara(appearance).GetReturnTime(AnimFrameType, CharDir);
     AnimTotalTime  = GraphicsManager.GetChara(appearance).GetTotalTime(AnimFrameType, CharDir);
     if (prevAnim.TakesPrevActionTime() && TakesPrevActionTime())
     {
         PrevActionTime = prevAnim.AddPrevActionTime();
     }
 }
Exemple #3
0
        public override bool ProcessInterruptingAction(CharAnimation newAnim)
        {
            CharAnimWalk walkAnim = newAnim as CharAnimWalk;

            if (walkAnim == null)
            {
                return(newAnim.MajorAnim);
            }

            MidLocs.Add(ToLoc);
            MidDirs.Add(CharDir);

            ToLoc   = walkAnim.ToLoc;
            CharDir = walkAnim.CharDir;

            SpeedMult = MidLocs.Count;

            return(false);
        }
Exemple #4
0
 public virtual bool ProcessInterruptingAction(CharAnimation newAnim)
 {
     return(newAnim.MajorAnim);
 }