-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMP.cs
More file actions
62 lines (46 loc) · 1.02 KB
/
MP.cs
File metadata and controls
62 lines (46 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using System;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework;
using System.Collections;
using System.Collections.Generic;
namespace Dabrorius.MonoPunk
{
public static class MP
{
/**
* The current screen buffer, drawn to in the render loop.
*/
public static SpriteBatch Buffer;
public static double Elapsed;
public static int Width;
public static int Height;
public static Vector2 Camera;
public static float FElapsed
{
get { return (float) Elapsed; }
}
public static World CurrentWorld
{
get {return currentWorld;}
set
{
if( currentWorld != value )
{
nextWorld = value;
}
}
}
public static float Degs2Rad(float degrees)
{
return ( degrees / 180 * ( (float) Math.PI ) );
}
public static int Rand(int amount)
{
return random.Next(0, amount);
}
internal static World currentWorld;
internal static World nextWorld;
private static Random random = new Random();
}
}