private void ContinueGame() { // Animate the robot m_robot.StartAnimation(LuaAnimation.Get("animation/menus/startscreen/robot_move.anim.lua"), false); m_robot.PlaySoundAfterDelay("sound/new_robot/idle_loop.wav", true, 0.3f); var delay = 1.25f; if (App.Demo) { // Start the main campaign var campaign = Campaign.Get("campaigns/demo.campaign"); var playthrough = new Playthrough(Campaign.Get("campaigns/demo.campaign"), 0); var firstLevel = campaign.Levels[0]; var firstLevelData = LevelData.Get(firstLevel); if (firstLevelData.Intro != null) { WipeToState(new CutsceneState(Game, null, firstLevelData.Intro, CutsceneContext.LevelIntro, playthrough), delay); } else { WipeToState(new CampaignState(Game, null, playthrough)); } } else { // Open the campaign select WipeToState(new CampaignSelectState(Game), delay); } }
protected override void OnReveal() { base.OnReveal(); // Create robot m_robot = CreateEntity("models/entities/new/red_robot.obj"); // Start animation StartCameraAnimation("animation/menus/startscreen/camera_initial.anim.lua"); m_robot.StartAnimation(LuaAnimation.Get("animation/menus/startscreen/robot.anim.lua"), false); // Reposition sky Game.Sky.ForegroundModelTransform = Matrix4.CreateTranslation(-5.0f, 5.0f, -20.0f); }
public LuaArgs playAnimation(LuaArgs args) { var path = args.GetString(0); var animateRoot = args.IsNil(1) ? true : args.GetBool(1); if (LuaAnimation.Exists(path)) { var anim = LuaAnimation.Get(path); m_entity.StartAnimation(anim, animateRoot); return(LuaArgs.Empty); } else { throw new LuaError(string.Format("No such animation: {0}", path)); } }
protected void FuzzToState(State state) { m_robot.StartAnimation(LuaAnimation.Get("animation/menus/options/robot_fuzz.anim.lua"), false); CutToState(state, 0.5f); }