コード例 #1
0
 public InventoryScreenButton(int xLoc, int yLoc, string graphic, string actionin, Screen pS)
 {
     goodGraphic = Textures.textures[graphic];
     x = xLoc;
     y = yLoc;
     action = actionin;
     imageBoundingRectangle = new Rectangle(0, 0, goodGraphic.Width, goodGraphic.Height);
     clickBox = new Rectangle(x, y, goodGraphic.Width, goodGraphic.Height);
     parentScreen = pS;
 }
コード例 #2
0
ファイル: Game1.cs プロジェクト: ferg060129/Toggle
        public void setState(string state, string arg2)
        {
            gameState = state;
            if (gameState == "start")
            {
                titleScreenPhase = 0;
                screenDisplayed = Textures.textures["titleScreen3"];
            }
            if (gameState == "help")
            {
                titleScreenPhase = 2;
            }

            if (gameState == "textbox")
            {
               switch(arg2)
               {
                   case "inventory":
                       currentTextBoxScreen = inventoryScreen;
                       showInventory = true;
                       break;
                   case "shiftLock":
                       currentTextBoxScreen = shiftLockScreen;
                       break;
                   case "platform":
                       currentTextBoxScreen = platformScreen;
                       break;
                   case "beginningExposition":
                       currentTextBoxScreen = openingExpositionScreen;
                       break;
                   case "diaryExposition":
                       currentTextBoxScreen = diaryExpositionScreen;
                       break;
                   case "knifeExposition":
                       currentTextBoxScreen = knifeExpositionScreen;
                       break;
                   case "roseExposition":
                       currentTextBoxScreen = roseExpositionScreen;
                       break;
               }
               screenDisplayed = Textures.textures["inventorytutorial"];

            }
        }