-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHoldCrystalRock.cs
More file actions
60 lines (45 loc) · 1.42 KB
/
HoldCrystalRock.cs
File metadata and controls
60 lines (45 loc) · 1.42 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 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 HoldCrystalRock : HoldItem
{
public HoldCrystalRock(CollisionCheck check, Player player) : base(check, player)
{
this.id = 101;
this.player = player;
this.check = check;
holdoffset = 30;
xmidoffset = 25;
xleftholdoffset = 0;
xrightholdoffset = 60;
throwvel = 14;
spriteEffects = SpriteEffects.None;
setDefaultValues();
}
public void setDefaultValues()
{
hitbox.X = 200;
hitbox.Y = 200;
hitbox.Width = 40;
hitbox.Height = 35;
croprect.X = 0;
croprect.Y = 128;
croprect.Width = 128;
croprect.Height = 128;
drawrect = new Rectangle(0, 0, 40, 40);
bounce = 5;
}
public override void draw(SpriteBatch _spriteBatch)
{
drawrect.X = (int)hitbox.X - player.centerWorldX + player.centerX;
drawrect.Y = (int)hitbox.Y - player.centerWorldY + player.centerY;
_spriteBatch.Draw(texture, drawrect, croprect, Color.White, 0, Vector2.Zero, spriteEffects, 1);
}
}
}