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)) { CameraEventMover comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover"); if(comp == null) { cam.gameObject.AddComponent("CameraEventMover"); comp = (CameraEventMover)cam.gameObject.GetComponent("CameraEventMover"); } comp.StartCoroutine(comp.SetTargetData(DataHolder.CameraPosition(this.posID), cam, actor.transform, 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); } }
public override void Execute(BattleAnimation battleAnimation) { GameObject actor = battleAnimation.GetAnimationObject(this.animationObject, this.prefabID2); GameObject target = null; if(BattleMoveToTarget.TARGET.Equals(this.moveToTarget) && battleAnimation.battleAction.target != null && battleAnimation.battleAction.target.Length > 0) { target = DataHolder.BattleSystem().GetGroupCenter(battleAnimation.battleAction.target); } else if(BattleMoveToTarget.BASE.Equals(this.moveToTarget)) { target = battleAnimation.battleAction.user.GetBattleSpot().gameObject; } else if(BattleMoveToTarget.CENTER.Equals(this.moveToTarget)) { target = DataHolder.BattleSystem().GetArenaCenter(); } if(actor != null && target != null) { if(this.pathToChild != "") { Transform t = target.transform.Find(this.pathToChild); if(t != null) target = t.gameObject; } actor.transform.position = target.transform.position+this.v3; } battleAnimation.StepFinished(this.next); }
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); }
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); } }
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); }