-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstairs.cs
47 lines (44 loc) · 1.11 KB
/
stairs.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
namespace Game3
{
public class Stairs
{
public int minx, maxx, miny, maxy, z, heigth;
public Map.orientation o;
public string tile;
public bool onstaircase;
public Map Map
{
get{return map;}
}
Map map;
public Stairs(Map map, int minsx, int maxsx, int minsy, int maxsy, int sz, int sheigth, Map.orientation so, string ssound)
{
this.map = map;
this.minx = minsx;
this.maxx = maxsx;
this.miny = minsy;
this.maxy = maxsy;
this.z = sz;
this.heigth = sheigth;
this.o = so;
this.tile = ssound;
}
public void Update(GameTime gameTime)
{
if (map.Player.me.X >= minx && map.Player.me.X <= maxx && map.Player.me.Y >= miny && map.Player.me.Y <= maxy)
{
onstaircase = true;
}
else
{
onstaircase = false;
}
}
}
}