-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJumpCantrip.cs
66 lines (49 loc) · 1.49 KB
/
JumpCantrip.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace monowizard
{
internal class JumpCantrip : Cantrip
{
Texture2D cloudTexture;
int spellframe;
Player player;
public bool isfiring;
public bool canjump = true;
public int realmanacost = 1;
public JumpCantrip(Player player)
{
this.player = player;
id = 1;
pushonhit = 4;
manacost = 1;
symbcroprect = new Rectangle(128, 128, 128, 128);
cantripnum = 4;
}
public override void cast()
{
player.changeMana(manacost);
if (canjump && realmanacost < player.mana)
{
player.ledgegrab = false;
player.changeMana(-realmanacost);
player.elevation = player.hitbox.Y;
player.yvel = -10;
player.mm.particleManager.addWindParticle(player.hitbox.X,player.hitbox.Y+80,0,0,0);
player.mm.particleManager.addWindParticle(player.hitbox.X+80, player.hitbox.Y + 80, 0, 0,1);
}
canjump = false;
}
public override void update()
{
if(player.framesicneground < 3)
{
canjump = true;
}
}
}
}