public virtual void Smash() { SmashPaint(); animationState = PlaneEntity.GetAnimationState("die"); animationState.Loop = false; animationState.Enabled = true; animationMgr.disableIdle(); SetBladeVisibility(false); }
protected virtual void initOnScene() { if (EngineConfig.SoundEnabled) { planePassSound = SoundManager3D.Instance.CreateSoundEntity(SoundManager3D.C_PLANE_PASS, this.planeNode, false, false); } initBlade(); initWheels(); initAnimationManager(); animationState = PlaneEntity.GetAnimationState("manual"); }
public virtual void Restore() { RestorePaint(); animationState = PlaneEntity.GetAnimationState("manual"); animationState.Loop = false; animationState.Enabled = true; SetBladeVisibility(true); EffectsManager.Singleton.NoSmoke(sceneMgr, OuterNode, EffectsManager.SmokeType.LIGHTSMOKE); EffectsManager.Singleton.NoSmoke(sceneMgr, OuterNode, EffectsManager.SmokeType.NORMAL); ResetWheels(); OuterNode.ResetOrientation(); InnerNode.ResetOrientation(); animationMgr.disableAll(); animationMgr.enableBlade(); }
protected override void initOnScene() { lWingNode = innerNode.CreateChildSceneNode(name + "LWingNode", new Vector3(-8.8f, -0.2f, -1.5f)); rWingNode = innerNode.CreateChildSceneNode(name + "RWingNode", new Vector3(8.8f, -0.2f, -1.5f)); if (plane != null && !this.plane.IsEnemy) { EnableNightLights(); } // main nodes init planeEntity = sceneMgr.CreateEntity(name + "_Body", GetMainMeshName()); planeEntity.CastShadows = EngineConfig.ShadowsQuality > 0; innerNode.AttachObject(planeEntity); outerNode.Scale(new Vector3(0.4f, 0.4f, 0.4f)); initBlade(); initWheels(); SceneNode pilotNode = innerNode.CreateChildSceneNode(planeNode.Name + "Pilot", new Vector3(0, 1.0f, -0.4f)); Entity pilotEntity = sceneMgr.CreateEntity(name + "_Pilot", "Pilot.mesh"); pilotNode.AttachObject(pilotEntity); torpedoHolder = innerNode.CreateChildSceneNode(planeNode.Name + "TorpedoHolder", new Vector3(0, -1.6f, 1.6f)); if (plane != null) { torpedoHolder.Scale(2.5f, 2.5f, 2.5f); // caly node jest skalowany x 0.4 Entity torpedo = sceneMgr.CreateEntity(name + "_Torpedo", "Torpedo.mesh"); torpedoHolder.AttachObject(torpedo); } ViewHelper.AttachAxes(sceneMgr, innerNode, 1.5f); refreshPosition(); // base.initOnScene(); initAnimationManager(); if (EngineConfig.SoundEnabled) { planePassSound = SoundManager3D.Instance.CreateSoundEntity(SoundManager3D.C_PLANE_PASS, this.planeNode, false, false); } if (this.plane != null && this.plane.WheelsState == WheelsState.In) { this.animationMgr.switchToGearUpDown(false); this.animationMgr.CurrentAnimation.Enabled = false; animationMgr.disableAll(); } if (plane != null && plane.LocationState == LocationState.Air) { animationMgr.switchToIdle(); } animationMgr.enableBlade(); // vertex animation animationState = PlaneEntity.GetAnimationState("manual"); if (EngineConfig.DisplayingMinimap) { minimapItem = new MinimapItem(outerNode, this.frameWork.MinimapMgr, "Cube.mesh", new ColourValue(0, 0.9f, 0), planeEntity); minimapItem.ScaleOverride = new Vector2(0, 5); minimapItem.MinimapNode.Translate(0, 0, 10.0f); minimapItem.Refresh(); } // kamery ResetCameraHolders(); }