A stealth-based 2D platformer where you don't have to kill anyone unless you want to. https://www.semicolin.games
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
750 B

  1. using Microsoft.Xna.Framework;
  2. using Microsoft.Xna.Framework.Graphics;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace SemiColinGames {
  6. public sealed class ShmupWorld : IWorld {
  7. public struct ShmupPlayer {
  8. // Center of player sprite.
  9. public Vector2 Position;
  10. }
  11. public ShmupPlayer Player;
  12. public ShmupWorld() {
  13. Player = new ShmupPlayer();
  14. }
  15. ~ShmupWorld() {
  16. Dispose();
  17. }
  18. public void Dispose() {
  19. GC.SuppressFinalize(this);
  20. }
  21. public void Update(float modelTime, History<Input> input) {
  22. float speed = 150f;
  23. Vector2 motion = Vector2.Multiply(input[0].Motion, modelTime * speed);
  24. Player.Position = Vector2.Add(Player.Position, motion);
  25. }
  26. }
  27. }