Esempio n. 1
0
        public MadDog(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.LightBlue });

            moveBehaviour = new SineWalk(position, 100);
        }
Esempio n. 2
0
        public Bird(GraphicsDeviceManager g, Vector2 pos, Vector2 vel)
        {
            graphics = g;
            position = pos;
            velocity = vel;


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

            moveBehaviour1 = new FlockingFly();
            moveBehaviour2 = new SineWalk(new Vector2(0, 0), 5);
        }
Esempio 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);
            }
        }