Ejemplo n.º 1
0
        public Mathbeast(GraphicsDeviceManager g, Vector2 pos, Vector2 dir)
        {
            graphics  = g;
            position  = pos;
            direction = dir;

            pixel = new Texture2D(graphics.GraphicsDevice, 1, 1);
            pixel.SetData(new Color[] { Color.LightGreen });

            moveBehaviour = new CosineWalk(position);
        }
Ejemplo n.º 2
0
        public Mathbeast(GraphicsDeviceManager g, Vector2 pos, Vector2 dir, TownCenter tc)
        {
            graphics   = g;
            position   = pos;
            direction  = dir;
            towncenter = tc;

            pixel = new Texture2D(graphics.GraphicsDevice, 1, 1);
            pixel.SetData(new Color[] { Color.White });

            moveBehaviour = new CosineWalk(position, 100);
        }
Ejemplo n.º 3
0
        private void UpdateInput()
        {
            KeyboardState newState = Keyboard.GetState();


            if (newState.IsKeyDown(Keys.Q))
            {
                moveBehaviour = new SineWalk(position);
            }
            if (newState.IsKeyDown(Keys.W))
            {
                moveBehaviour = new CosineWalk(position);
            }
        }