protected override void specialPlayerInteract(int choice, PlayerActionsInterface action) { if (sleeping) { unSleep(action); showDialogue = false; } else { switch (dialogue[dialogueInt].choices[choice]) { case "Sleep": action.lockMovement = true; action.hideSprite(); sleeping = true; frameSet = subsets["sleep"]; dialogueInt = 1; action.cancelDialogue(); action.lockMovement = false; break; case "Make Bed": dialogueInt = 0; frameSet = subsets["made"]; frameSet.nextFrame(); action.cancelDialogue(); showDialogue = false; action.lockMovement = false; break; } } }
protected override void specialPlayerInteract(int choice, PlayerActionsInterface actions) { if (!animating) { switch (dialogue[dialogueInt].choices[choice]) { case "Kick": animating = true; actions.cancelDialogue(); actions.lockMovement = false; break; } } }
protected override void specialPlayerInteract(int choice, PlayerActionsInterface action) { switch (dialogue[dialogueInt].choices[choice]) { case "Enter" : action.initUnload(path, link); unloadTimer = true; move = false; frameSet.nextFrame(); break; } showDialogue = false; action.cancelDialogue(); action.lockMovement = false; }
public Level(GraphicsDevice graphicsDevice, String map, int[] whys, List<Wall> walls, ContentManager Content, UnitInterface sprite, ObjectInterface[] objects, PlayerActionsInterface actions) { //Load Properties this.graphicsDevice = graphicsDevice; this.mapTexture = Content.Load<Texture2D>(map); this.walls = walls; this.whys = whys; this.actions = actions; this.objects = objects; this.mainguy = sprite; this.boundary = false; mapName = map; batch = new SpriteBatch(graphicsDevice); font = Content.Load<SpriteFont>("cheese serif"); speed = 5; update(); }
protected override void specialPlayerInteract(int choice, PlayerActionsInterface action) { switch (dialogue[dialogueInt].choices[choice]) { case "Open": frameSet.nextFrame(); dialogueInt = 1; break; case "Close": frameSet.nextFrame(); dialogueInt = 0; break; } showDialogue = false; action.cancelDialogue(); action.lockMovement = false; }
protected override void LoadContent() { Rectangle dicks = new Rectangle(); Vector2 ass; dicks.X = (int)ass.X; dicks.Y = (int)ass.Y; test[0] = new Item("test", Content.Load<Texture2D>("testimg")); // Create a new SpriteBatch, which can be used to draw textures. loader = new Loader(Content, GraphicsDevice); font = Content.Load<SpriteFont>("cheese serif"); mainguy = loader.getSpriteExt(); dialogueHandler = new DialogueHandler(Content.Load<Texture2D>("bubbles"), GraphicsDevice, font, mainguy); inventory = new Inventory(mainguy, test); uis = new UIManager(loader.getInventoryWindow(inventory)); playerActions = new PlayerActions(mainguy, dialogueHandler); levels = loader.getLevelExt(mainguy, playerActions); backgroundMusic = Content.Load<Song>("test"); currentLevel = levels[loader.getLevelIntExt()]; currentLevel.setLoc(loader.getSaveCoords()); playerActions.level = currentLevel; area = loader.getAreaExt(); MediaPlayer.IsRepeating = true; MediaPlayer.Play(backgroundMusic); // TODO: use this.Content to load your game content here }
public void playerInteract(int choice, PlayerActionsInterface action) { if (!showDialogue) { showDialogue = true; action.lockMovement = true; action.setDialogue(dialogue[dialogueInt]); } else if (choice == dialogue[dialogueInt].choices.Count - 1) { action.cancelDialogue(); action.lockMovement = false; showDialogue = false; } else specialPlayerInteract(choice, action); }
protected virtual void specialPlayerInteract(int choice, PlayerActionsInterface action) { //override me }
protected override void specialPlayerInteract(int choice, PlayerActionsInterface action) { }
//just storing code for when i fix the bed sleeping private void unSleep(PlayerActionsInterface action) { action.lockMovement = false; action.showSprite(); frameSet = subsets["made"]; frameSet.nextFrame(); sleeping = false; }