Example #1
0
    private void Awake()
    {
        _keySign = transform.Find("KeySign").GetComponent <KeySign>();

        _playerGeneralAttributes = Player.GetComponent <GeneralAttributes>();
        _playerRigidBody2D       = Player.GetComponent <Rigidbody2D>();
    }
Example #2
0
    private void Awake()
    {
        _rigidbody2D       = GetComponent <Rigidbody2D>();
        _jump              = GetComponent <Jump>();
        _generalAttributes = GetComponent <GeneralAttributes>();

        _speed = MaxOnGroundSpeed;
    }
Example #3
0
        /// <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);
        }
Example #4
0
 /// <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();
 }
Example #5
0
 private void Awake()
 {
     _rigidbody2D       = GetComponent <Rigidbody2D>();
     _generalAttributes = GetComponent <GeneralAttributes>();
 }
Example #6
0
 public void IsBackgroundWhite()
 {
     Assert.That(Color.White, Is.EqualTo(GeneralAttributes.BackgroundColor()));
 }