private void Awake() { _keySign = transform.Find("KeySign").GetComponent <KeySign>(); _playerGeneralAttributes = Player.GetComponent <GeneralAttributes>(); _playerRigidBody2D = Player.GetComponent <Rigidbody2D>(); }
private void Awake() { _rigidbody2D = GetComponent <Rigidbody2D>(); _jump = GetComponent <Jump>(); _generalAttributes = GetComponent <GeneralAttributes>(); _speed = MaxOnGroundSpeed; }
/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { graphics.GraphicsDevice.Clear(GeneralAttributes.BackgroundColor()); spriteBatch.Begin(SpriteSortMode.Deferred); board.Draw(spriteBatch); spriteBatch.End(); base.Draw(gameTime); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { generalAttributes = new GeneralAttributes(); generalAttributes.GenerateTextures(graphics.GraphicsDevice); base.Initialize(); }
private void Awake() { _rigidbody2D = GetComponent <Rigidbody2D>(); _generalAttributes = GetComponent <GeneralAttributes>(); }
public void IsBackgroundWhite() { Assert.That(Color.White, Is.EqualTo(GeneralAttributes.BackgroundColor())); }