public CutSceneScreen(GraphicsDeviceManager g, ContentManager c, SpriteFont f, World inWorld, Player inPlayer, CutScene scene) : base(g, c, f) { world = inWorld; player = inPlayer; lua = new Lua(); // widescreen animation stuff Color[] color = { new Color(0, 0, 0) }; barTexture = new Texture2D(g.GraphicsDevice, 1, 1); barTexture.SetData <Color>(color); topBarRect = new Rectangle(0, -40, 800, 40); bottomBarRect = new Rectangle(0, 480, 800, 40); NewCutScene(scene); }
public void NewCutScene(CutScene scene) { player.actions = scene.playerActions; player.movement = MovementType.PATH; NewCutScene(scene.commands, scene.NPCs, scene.length); }
private void StartCutScene() { CutScene scene = new CutScene(); scene.length = -1; scene.name = "Test Scene"; scene.playerActions.Add(PC.Action.LEFT); scene.playerActions.Add(PC.Action.RIGHT); scene.playerActions.Add(PC.Action.LEFT); scene.playerActions.Add(PC.Action.RIGHT); scene.playerActions.Add(PC.Action.LEFT); scene.playerActions.Add(PC.Action.RIGHT); scene.playerActions.Add(PC.Action.LEFT); scene.playerActions.Add(PC.Action.RIGHT); scene.playerActions.Add(PC.Action.LEFT); scene.playerActions.Add(PC.Action.RIGHT); scene.playerActions.Add(PC.Action.LEFT); scene.playerActions.Add(PC.Action.RIGHT); scene.playerActions.Add(PC.Action.LEFT); scene.playerActions.Add(PC.Action.RIGHT); scene.playerActions.Add(PC.Action.LEFT); scene.playerActions.Add(PC.Action.RIGHT); scene.playerActions.Add(PC.Action.LEFT); scene.playerActions.Add(PC.Action.RIGHT); scene.playerActions.Add(PC.Action.STOP); //set up some actions for (int i = 0; i < 11; i++) { Map.trainerList[0].AddAction(PC.Action.LEFT); Map.trainerList[1].AddAction(PC.Action.RIGHT); } Map.trainerList[0].AddAction(PC.Action.FACEUP); Map.trainerList[0].AddAction(PC.Action.FACERIGHT); Map.trainerList[0].AddAction(PC.Action.FACEDOWN); Map.trainerList[0].AddAction(PC.Action.FACELEFT); Map.trainerList[1].AddAction(PC.Action.FACEUP); Map.trainerList[1].AddAction(PC.Action.FACERIGHT); Map.trainerList[1].AddAction(PC.Action.FACEDOWN); Map.trainerList[1].AddAction(PC.Action.FACELEFT); for (int i = 0; i < 3; i++) { Map.trainerList[0].AddAction(PC.Action.DOWN); Map.trainerList[1].AddAction(PC.Action.UP); } Map.trainerList[0].AddAction(PC.Action.FACEUP); Map.trainerList[0].AddAction(PC.Action.FACERIGHT); Map.trainerList[0].AddAction(PC.Action.FACEDOWN); Map.trainerList[0].AddAction(PC.Action.FACELEFT); Map.trainerList[1].AddAction(PC.Action.FACEUP); Map.trainerList[1].AddAction(PC.Action.FACERIGHT); Map.trainerList[1].AddAction(PC.Action.FACEDOWN); Map.trainerList[1].AddAction(PC.Action.FACELEFT); for (int i = 0; i < 11; i++) { Map.trainerList[0].AddAction(PC.Action.RIGHT); Map.trainerList[1].AddAction(PC.Action.LEFT); } Map.trainerList[0].AddAction(PC.Action.FACEUP); Map.trainerList[0].AddAction(PC.Action.FACERIGHT); Map.trainerList[0].AddAction(PC.Action.FACEDOWN); Map.trainerList[0].AddAction(PC.Action.FACELEFT); Map.trainerList[1].AddAction(PC.Action.FACEUP); Map.trainerList[1].AddAction(PC.Action.FACERIGHT); Map.trainerList[1].AddAction(PC.Action.FACEDOWN); Map.trainerList[1].AddAction(PC.Action.FACELEFT); for (int i = 0; i < 3; i++) { Map.trainerList[0].AddAction(PC.Action.UP); Map.trainerList[1].AddAction(PC.Action.DOWN); } Map.trainerList[0].AddAction(PC.Action.FACEUP); Map.trainerList[0].AddAction(PC.Action.FACERIGHT); Map.trainerList[0].AddAction(PC.Action.FACEDOWN); Map.trainerList[0].AddAction(PC.Action.FACELEFT); Map.trainerList[1].AddAction(PC.Action.FACEUP); Map.trainerList[1].AddAction(PC.Action.FACERIGHT); Map.trainerList[1].AddAction(PC.Action.FACEDOWN); Map.trainerList[1].AddAction(PC.Action.FACELEFT); Map.trainerList[0].AddAction(PC.Action.STOP); Map.trainerList[1].AddAction(PC.Action.STOP); scene.NPCs = Map.trainerList; Trainer temp = new Trainer(player); //start up the cutscene List <TimedCommand> commands = new List <TimedCommand>(); commands.Add(new TimedCommand(10 * Map.trainerList[0].speed, "ShowMessage(\"TESTING\")")); commands.Add(new TimedCommand(45 * Map.trainerList[0].speed, "EndCutScene()")); commands.Add(new TimedCommand(0, "WaitTill(\"Lady\", 150)")); commands.Add(new TimedCommand(140, "WaitTill(\"Boy\", 20)")); scene.commands = commands; ScreenHandler.PushScreen(new CutSceneScreen(graphics, content, font, world, player, scene)); }