Exemple #1
0
 public Data(GraphicsDeviceManager graphiceDeviceManager, ContentManager content, SpriteBatch spriteBatch) : base(graphiceDeviceManager, content, spriteBatch)
 {
     AddScreen(ScreenMode.Game, Screen     = new Screen(this, null));
     AddScreen(ScreenMode.Data, Inventorys = new Inventory(this, null));
     AddScreen(ScreenMode.UI, UI           = new PlayUI(this, null));
     SelectMenu(ScreenMode.UI | ScreenMode.Game, ScreenMode.UI | ScreenMode.Game);
 }
Exemple #2
0
 void OnEnable()
 {
     startUIControl     = FindObjectOfType <StartUIControl>();
     setUpUIControl     = FindObjectOfType <SetUpUIControl>();
     instructionControl = FindObjectOfType <InstructionControl>();
     playUI             = FindObjectOfType <PlayUI>();
     turnController     = FindObjectOfType <TurnController>();
 }
Exemple #3
0
 private void GetComponents()
 {
     playUi          = GetComponent <PlayUI>();
     modeController  = GetComponent <ModeController>();
     leftForce       = leftPusher.GetComponentInChildren <ApplyForce>();
     rightForce      = rightPusher.GetComponentInChildren <ApplyForce>();
     leftPushHelper  = playUi.leftPushButton.GetComponent <ButtonHelper>();
     rightPushHelper = playUi.rightPushButton.GetComponent <ButtonHelper>();
 }
Exemple #4
0
 void Start()
 {
     Debug.Log(moneyText.text);
     moneyText.text = money.ToString("F2");
     player         = GameObject.Find("Player").GetComponent <Player>();
     if (_gameState == GameState.Start)
     {
         PlayUI.SetActive(false);
     }
     Setting1stGame();
 }
Exemple #5
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            // TODO: Add your drawing code here

            PlayUI.Draw(spriteBatch);
            playerBoard.Draw(spriteBatch);
            cursor.Draw(spriteBatch);

            base.Draw(gameTime);
        }
Exemple #6
0
 private void Start()
 {
     mEniroment = GameObject.FindWithTag("Eniroment").transform;
     mCancelBtn = transform.GetChild(0).Find("CancelBtn").GetComponent <Button>();
     mCancelBtn.onClick.AddListener(OnCancelClick);
     mPlayUI          = transform.GetChild(0).Find("PlayUI").GetComponent <PlayUI>();
     mGameUI          = transform.GetChild(0).Find("GameUI").GetComponent <GameUI>();
     mGameFinishUI    = transform.GetChild(0).Find("GameFinishUI").GetComponent <GameFinishUI>();
     mChangeDiffuseUI = transform.GetChild(0).Find("ChangeDiffuseUI").GetComponent <ChangeDiffuseUI>();
     mChooseLvUI      = transform.GetChild(0).Find("ChooseLvUI").GetComponent <ChooseLvUI>();
     mGoldEffect      = transform.GetChild(0).Find("GoldEffect").GetComponent <GoldEffect>();
     InitUI();
 }
 void Awake()
 {
     Instance = this;
 }
Exemple #8
0
 public override void Start()
 {
     _playUI = FindObjectOfType <PlayUI> ();
     base.Start();
 }