public void Awake() { IsShowingBuyUI = false; floorSystem = FloorSystem.Instance; floorSystem.onShowingDifferentFloor.AddListener(Show); floorSystem.onBuyFloor.AddListener(Show); }
// Start is called before the first frame update void Start() { m_Collider = GetComponent <BoxCollider>(); m_Timer = 0; m_BoxListParent = Instantiate(new GameObject()); m_BoxListParent.name = "BoxList"; // m_BoxList = new List<GameObject>(); m_FloorSystem = GameObject.Find("FloorSystem").GetComponent <FloorSystem>(); }
protected override void Update(GameTime gameTime) { Input.UpdateState(); PlayerSystem.Update(); FloorSystem.Update(); base.Update(gameTime); }
protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. Globals.SpriteBatch = new SpriteBatch(GraphicsDevice); Assets.Load(); PlayerSystem.Load(); FloorSystem.Load(); }
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); Globals.SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullNone);; FloorSystem.Draw(); PlayerSystem.Draw(); Globals.SpriteBatch.End(); base.Draw(gameTime); }