-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScafoldingTrueTile.cs
More file actions
59 lines (44 loc) · 1.22 KB
/
ScafoldingTrueTile.cs
File metadata and controls
59 lines (44 loc) · 1.22 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
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace monowizard
{
internal class ScafoldingTrueTile : Truetile
{
TileManager tileManager;
public int tileind;
int cooldown = 0;
int health = 4;
public ScafoldingTrueTile( int ind, TileManager tileManager)
{
tileind = ind;
this.tileManager = tileManager;
croprect = new Microsoft.Xna.Framework.Rectangle(768, 0, 128, 128);
}
public override void Activate(int side, Entity e)
{
//Debug.WriteLine("yipyip");
if (cooldown == 0)
{
health -= 1;
croprect.Y += 128;
cooldown = 60;
if(health < 1)
{
tileManager.map[tileind] = tileManager.backmap[tileind];
//tileManager.player.ledgegrab = false;
}
}
}
public override void Update()
{
if(cooldown > 0)
{
cooldown -= 1;
}
}
}
}