示例#1
0
 public ScareHouseTask(GameState stateInside) {
   super(stateInside, "Scare house");
   littleDemonPosX = 30;
   housesPosX = new int[] {120, 190, 250};
   housesScared = new boolean[] {false, false, false};
   completePrompt = stateInside.getAssetManager().getImage("taskCompletePrompt");
   houseNotScared = stateInside.getAssetManager().getImage("houseNotScared");
   houseIsScared = stateInside.getAssetManager().getImage("houseIsScared");
   scarePrompt = stateInside.getAssetManager().getImage("scarePrompt");
   aPrompt = stateInside.getAssetManager().getImage("aKeyPrompt");
   dPrompt = stateInside.getAssetManager().getImage("dKeyPrompt");
   demonTinyTask = stateInside.getAssetManager().getImage("demonTinyTask");
   roadImage = stateInside.getAssetManager().getImage("roadLunchTask");
 }
示例#2
0
 public MakeCoffeeTask(GameState stateInside) {
   super(stateInside, "Make coffee");
   images =
       new BufferedImage[] {
         stateInside.getAssetManager().getImage("coffeepot1"),
         stateInside.getAssetManager().getImage("coffeepot2"),
         stateInside.getAssetManager().getImage("coffeepot3"),
         stateInside.getAssetManager().getImage("coffeepot4"), // 3
         stateInside.getAssetManager().getImage("taskCompletePrompt"),
         stateInside.getAssetManager().getImage("brewingPrompt"), // 5
         stateInside.getAssetManager().getImage("fKeyPrompt"),
         stateInside.getAssetManager().getImage("pKeyPrompt"),
         stateInside.getAssetManager().getImage("oKeyPrompt"),
       };
   coffeeMachineImage = stateInside.getAssetManager().getImage("coffeepotBackground");
   coffeeBrew.setAction(
       new TimerAction() {
         @Override
         public void intervalComplete() {
           setComplete(true);
           coffeeBrew.setStopped(true);
         }
       });
 }