public void switchToGearUpDown(bool disableOthers, NodeAnimation.NotityStart onStart, NodeAnimation.NotityFinish onFinish) { if (disableOthers) { disableAll(); } switchTo(AnimationType.L_GEAR_UP); (currentAnimation as RotateNodeAnimation).MaxAngle *= -1; rewind(true); Looped = false; switchTo(AnimationType.R_GEAR_UP); (currentAnimation as RotateNodeAnimation).MaxAngle *= -1; rewind(true); Looped = false; switchTo(AnimationType.REAR_GEAR_UP); (currentAnimation as RotateNodeAnimation).MaxAngle *= -1; rewind(true); Looped = false; if (onStart != null) { currentAnimation.onStart = onStart; } if (onFinish != null) { currentAnimation.onFinish = onFinish; } }
public void switchToDeathSpin(bool disableOthers, NodeAnimation.NotityStart onStart, NodeAnimation.NotityFinish onFinish) { bool enableBladed = false; switchTo(AnimationType.BLADE); if (currentAnimation.Enabled) { enableBladed = true; } if (disableOthers) { disableAll(); } if (enableBladed) { enableBlade(); } switchTo(AnimationType.DEATH_SPIN); rewind(true); Looped = true; if (onStart != null) { currentAnimation.onStart = onStart; currentAnimation.onStartInfo = null; } if (onFinish != null) { currentAnimation.onFinish = onFinish; currentAnimation.onFinishInfo = null; } }
public void switchToTurnOnCarrier(bool disableOthers, NodeAnimation.NotityStart onStart, NodeAnimation.NotityFinish onFinish) { if (disableOthers) { disableAll(); } enableBlade(); switchTo(AnimationType.TURN_ON_CARRIER); rewind(true); Looped = false; TurnInfo ti = new TurnInfo(); ti.plane = planeView.Plane; ti.turnDurationInSeconds = currentAnimation.Duration; ti.turnType = TurnType.Carrier; if (onStart != null) { currentAnimation.onStart = onStart; currentAnimation.onStartInfo = ti; } if (onFinish != null) { currentAnimation.onFinish = onFinish; currentAnimation.onFinishInfo = ti; } }
public void switchToSpin(bool disableOthers, NodeAnimation.NotityStart onStart, NodeAnimation.NotityFinish onFinish, object onFinishInfo, bool queue) { if (disableOthers) { disableAll(); } enableBlade(); // this.planeView.OuterNode.ResetOrientation(); switchTo(queue ? AnimationType.SPIN_PHASE_ONE : AnimationType.SPIN_PHASE_TWO); rewind(true); Looped = false; if (onStart != null) { currentAnimation.onStart = onStart; currentAnimation.onStartInfo = null; } if (onFinish != null) { //1sza faza spinu if (queue) { currentAnimation.onFinish = OnFinishHalfSpin; queuedOnFinish = onFinish; queuedOnFinishInfo = onFinishInfo; } //2ga faza spinu else { currentAnimation.onFinish = onFinish; currentAnimation.onFinishInfo = onFinishInfo; } } }