예제 #1
0
파일: Bed.cs 프로젝트: juntang/Portfolio
 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;
         }
     }
 }
예제 #2
0
파일: Pig.cs 프로젝트: juntang/Portfolio
 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;
         }
     }
 }
예제 #3
0
파일: Door.cs 프로젝트: juntang/Portfolio
 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;
 }
예제 #4
0
파일: Level.cs 프로젝트: juntang/Portfolio
 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();
 }
예제 #5
0
 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;
 }
예제 #6
0
파일: Game1.cs 프로젝트: juntang/Portfolio
 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
 }
예제 #7
0
파일: Entity.cs 프로젝트: juntang/Portfolio
 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);
 }
예제 #8
0
파일: Entity.cs 프로젝트: juntang/Portfolio
 protected virtual void specialPlayerInteract(int choice, PlayerActionsInterface action)
 {
     //override me
 }
예제 #9
0
 protected override void specialPlayerInteract(int choice, PlayerActionsInterface action)
 {
 }
예제 #10
0
파일: Bed.cs 프로젝트: juntang/Portfolio
 //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;
 }