예제 #1
0
        public override void Update(float deltaTime)
        {
            Vector2 pos = this.Entity.Position;


            float xSpd = _input.GetLeftStick().X;
            float ySpd = _input.GetLeftStick().Y;

            pos.X += xSpd * (_pxPerSecond * deltaTime);
            pos.Y += ySpd * (_pxPerSecond * deltaTime);

            this.Entity.Position = pos;
            this.Entity.Scene.MainCamera.Position = pos;

            if (_input.IsButtonPressed(Buttons.A))
            {
                _emitter.Emit();
            }
        }