Exemplo n.º 1
0
 /// <summary>
 /// Poll the input state for movement
 /// </summary>
 /// <param name="input"></param>
 public void HandleInput(InputState input)
 {
     direction.X = input.MoveCatX;
     direction.Y = input.MoveCatY;
 }
Exemplo n.º 2
0
        public FlockingSample()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

#if WINDOWS_PHONE || IOS
            // Frame rate is 30 fps by default for Windows Phone.
            TargetElapsedTime = TimeSpan.FromTicks(333333);
            graphics.IsFullScreen = true;
#endif
            inputState = new InputState();

            flock = null;
            cat = null;

            flockParams = new AIParameters();
            ResetAIParams();
        }