Пример #1
0
 public override void Execute(BattleAnimation battleAnimation)
 {
     bool finished = false;
     Transform cam = battleAnimation.GetCamera();
     if(cam != null &&
         !battleAnimation.camBlocked &&
         (battleAnimation.IsLatestActiveAction() ||
         !DataHolder.BattleSystem().dynamicCombat))
     {
         CameraEventMover comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
         if(comp == null)
         {
             cam.gameObject.AddComponent("CameraEventMover");
             comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
         }
         comp.StartCoroutine(comp.SetTargetData(battleAnimation.initialCamPosition, battleAnimation.initialCamRotation,
                 battleAnimation.initialFieldOfView, cam, this.interpolate, this.time));
         if(this.wait)
         {
             finished = true;
             battleAnimation.StartTime(this.time, this.next);
         }
     }
     if(!finished)
     {
         if(this.wait) battleAnimation.StartTime(this.time, this.next);
         else battleAnimation.StepFinished(this.next);
     }
 }
Пример #2
0
 public override void Execute(BattleAnimation battleAnimation)
 {
     bool finished = false;
     Transform cam = battleAnimation.GetCamera();
     if(cam != null &&
         !battleAnimation.camBlocked &&
         (battleAnimation.IsLatestActiveAction() ||
         !DataHolder.BattleSystem().dynamicCombat))
     {
         CameraEventMover comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
         if(comp == null)
         {
             cam.gameObject.AddComponent("CameraEventMover");
             comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
         }
         comp.CameraShake(cam, this.time, this.intensity, this.speed);
         if(this.wait)
         {
             finished = true;
             battleAnimation.StartTime(this.time, this.next);
         }
     }
     if(!finished)
     {
         if(this.wait) battleAnimation.StartTime(this.time, this.next);
         else battleAnimation.StepFinished(this.next);
     }
 }
Пример #3
0
    public override void Execute(BattleAnimation battleAnimation)
    {
        bool finished = false;
        Transform cam = battleAnimation.GetCamera();
        GameObject actor = battleAnimation.GetAnimationObject(this.animationObject, this.prefabID);
        if(cam != null && actor != null &&
            !battleAnimation.camBlocked &&
            (battleAnimation.IsLatestActiveAction() ||
            !DataHolder.BattleSystem().dynamicCombat))
        {
            actor = TransformHelper.GetChild(this.pathToChild, actor.transform).gameObject;

            CameraEventMover comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
            if(comp == null)
            {
                cam.gameObject.AddComponent("CameraEventMover");
                comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover");
            }
            comp.CameraRotate(cam, actor.transform, this.v3, this.time, this.speed);
            if(this.wait)
            {
                finished = true;
                battleAnimation.StartTime(this.time, this.next);
            }
        }
        if(!finished)
        {
            if(this.wait) battleAnimation.StartTime(this.time, this.next);
            else battleAnimation.StepFinished(this.next);
        }
    }
Пример #4
0
 public override void Execute(BattleAnimation battleAnimation)
 {
     Transform cam = battleAnimation.GetCamera();
     GameObject actor = battleAnimation.GetAnimationObject(this.animationObject, this.prefabID);
     if(cam != null && actor != null &&
         !battleAnimation.camBlocked &&
         (battleAnimation.IsLatestActiveAction() ||
         !DataHolder.BattleSystem().dynamicCombat))
     {
         DataHolder.CameraPosition(this.posID).Use(cam, actor.transform);
     }
     battleAnimation.StepFinished(this.next);
 }
Пример #5
0
 public override void Execute(BattleAnimation battleAnimation)
 {
     Transform cam = battleAnimation.GetCamera();
     if(cam != null &&
         !battleAnimation.camBlocked &&
         (battleAnimation.IsLatestActiveAction() ||
         !DataHolder.BattleSystem().dynamicCombat))
     {
         if(this.show)
         {
             GameObject actor = battleAnimation.GetAnimationObject(this.animationObject, this.prefabID);
             if(actor != null)
             {
                 TransformHelper.Mount(TransformHelper.GetChild(this.pathToChild, actor.transform), cam,
                         this.show2, this.show4, this.v3, this.show3, this.v3_2);
             }
         }
         else
         {
             cam.parent = null;
         }
     }
     battleAnimation.StepFinished(this.next);
 }