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); }
void OnEnable() { startUIControl = FindObjectOfType <StartUIControl>(); setUpUIControl = FindObjectOfType <SetUpUIControl>(); instructionControl = FindObjectOfType <InstructionControl>(); playUI = FindObjectOfType <PlayUI>(); turnController = FindObjectOfType <TurnController>(); }
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>(); }
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(); }
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); }
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; }
public override void Start() { _playUI = FindObjectOfType <PlayUI> (); base.Start(); }