Compare commits
2 Commits
1a025c275b
...
f05142066d
Author | SHA1 | Date | |
---|---|---|---|
f05142066d | |||
899b17d955 |
@ -1,7 +1,7 @@
|
|||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
using Microsoft.Xna.Framework.Graphics;
|
using Microsoft.Xna.Framework.Graphics;
|
||||||
using Microsoft.Xna.Framework.Input;
|
using Microsoft.Xna.Framework.Input;
|
||||||
using MonoGame.Framework.Utilities;
|
// using MonoGame.Framework.Utilities;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace SemiColinGames {
|
namespace SemiColinGames {
|
||||||
@ -25,8 +25,8 @@ namespace SemiColinGames {
|
|||||||
IWorld world;
|
IWorld world;
|
||||||
|
|
||||||
public SneakGame() {
|
public SneakGame() {
|
||||||
Debug.WriteLine("MonoGame platform: " + PlatformInfo.MonoGamePlatform +
|
// Debug.WriteLine("MonoGame platform: " + PlatformInfo.MonoGamePlatform +
|
||||||
" w/ graphics backend: " + PlatformInfo.GraphicsBackend);
|
// " w/ graphics backend: " + PlatformInfo.GraphicsBackend);
|
||||||
graphics = new GraphicsDeviceManager(this) {
|
graphics = new GraphicsDeviceManager(this) {
|
||||||
SynchronizeWithVerticalRetrace = true,
|
SynchronizeWithVerticalRetrace = true,
|
||||||
GraphicsProfile = GraphicsProfile.HiDef
|
GraphicsProfile = GraphicsProfile.HiDef
|
||||||
|
@ -23,7 +23,8 @@ namespace SemiColinGames {
|
|||||||
|
|
||||||
public void Update(float modelTime, History<Input> input) {
|
public void Update(float modelTime, History<Input> input) {
|
||||||
radius += 150 * modelTime * input[0].Motion.Y;
|
radius += 150 * modelTime * input[0].Motion.Y;
|
||||||
radius = Math.Clamp(radius, 50, 200);
|
radius = Math.Min(radius, 200);
|
||||||
|
radius = Math.Max(radius, 50);
|
||||||
float angleChange = modelTime * momentum / radius;
|
float angleChange = modelTime * momentum / radius;
|
||||||
angle += angleChange;
|
angle += angleChange;
|
||||||
float x = anchor.X + radius * (float) Math.Sin(angle);
|
float x = anchor.X + radius * (float) Math.Sin(angle);
|
||||||
|
Loading…
Reference in New Issue
Block a user