-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHadoken.java
More file actions
124 lines (96 loc) · 2.66 KB
/
Copy pathHadoken.java
File metadata and controls
124 lines (96 loc) · 2.66 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package com.smiths;
import org.andengine.entity.primitive.Rectangle;
import org.andengine.entity.shape.Shape;
import org.andengine.opengl.texture.region.TiledTextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;
import android.graphics.Rect;
import com.smiths.GameCharacter;
//Hadoken sub
public class Hadoken extends GameObject {
public Rectangle bodyRect;
public Shape collider;
public float currentscale = 1;
public float scalingfactor = (float) 0.3;
public boolean collision = false;
public int antigravity = 0;
public boolean startattack = true;
public int ypos;
public int xpos;
public int weapon;
public int oldxpos;
public int oldypos;
public int xdirection = 0;
public int ydirection = 0;
public int velocity_y = 0;
public int velocity_x = 0;
public int difference = 0;
public boolean topofjump = false;
public int oldanim = 0;
public boolean isActive = true;
public int speed;
public boolean justAppeared = true;
public double acceleration=0;
public int lastxdirection = 0;
public double xmovement =0;
public int deathtimer =0;
public boolean currentlyjumping = false;
public boolean rising = false;
public boolean falling = false;
public boolean isCrouching = false;
public int currentweapon = 0;
public int jumplevel = -20;
public boolean attack = true;
public boolean isHit = false;
public boolean jumpAttempt = false;
public boolean isAlive = true;
public int deathTimer = 0;
public int hitDirection = 0;
public int hitTimer = 0;
public boolean isHittable = true;
public int level = 1;
public int hitPower = 1;
public int totalHealth=1;
public int currenthealth=totalHealth;
public int deathanim = 0;
public boolean healthPowerUp = false;
public GameCharacter assailant;
public int score = 0;
public boolean isSword = false;
public boolean isPlayer = false;
public int kills = 0;
public int experience = 0;
public int rotationcounter=0;
public boolean locationlocked = false;
public int ymomentum=0;
public int xmomentum=0;
public GameCharacter thrower;
public int hits;
public Hadoken( int x, int y,TiledTextureRegion texture, VertexBufferObjectManager OM)
{
super(x, y, texture, OM);
bodyRect = new Rectangle(0,16, 64,32,OM);
this.attachChild(bodyRect);
this.self=bodyRect;
self.setVisible(false);
bodyRect.setVisible(false);
this.setVisible(true);
}
public void collect()
{
this.setVisible(false);
this.stopAnimation();
this.detachSelf();
this.isHit = false;
this.hits = 0;
}
public void reset()
{
this.setVisible(true);
this.isHit = false;
this.hits = 0;
}
public Rectangle AttackCollisionRect()
{
return bodyRect;
}
}