Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
82afc3d
xwing
Nov 9, 2018
118450c
look at spaceship
Nov 13, 2018
0787d07
finish fixing the ship's coordinates
Nov 15, 2018
ca35f06
make a teleport
Nov 27, 2018
538bdc3
IT CAN TELEPORTgit add .!
Nov 28, 2018
5dddf4b
go to case e
Nov 29, 2018
d9121a9
start working on the bullet
Nov 30, 2018
17f2802
collision detection
Dec 3, 2018
3e80b96
work on the pulse bomb
Dec 4, 2018
51fa2cb
make it a pulse
Dec 5, 2018
a162a05
work on the explosion
Dec 6, 2018
72e16ff
finish explosion
Dec 7, 2018
8759adb
fix the color thing
Dec 10, 2018
a331a08
done
Dec 11, 2018
c04bc5d
done
Dec 12, 2018
0f8eb4a
add cooldown timers
Dec 14, 2018
ad09749
finish the counters
Dec 19, 2018
c98b4e5
finish the counters
Jan 7, 2019
f132fdd
make the invincibility button charge on destroyed ships
Jan 8, 2019
6c028ac
add color
Jan 9, 2019
b843656
make stuff not red and finish invincibility
Jan 10, 2019
226d4d3
finish inv colors
Jan 11, 2019
29523b3
fix the errors and finish inv
Jan 14, 2019
1ec47cc
fix invincibility
Jan 15, 2019
d378e63
fix the errors on line 688
Jan 16, 2019
fb7c0af
fix timestop and help
Jan 17, 2019
44dff8e
finish cleaning up
Jan 18, 2019
69d6eb4
finish the help button and the boss
Jan 24, 2019
96b76c4
finish the boss
Jan 25, 2019
a661793
finish the boss code
Jan 28, 2019
ddf8b0b
make the boss code
Jan 29, 2019
239b433
fix the lag
Feb 1, 2019
d1ced12
fix the q ability
Feb 4, 2019
9064153
fix boom and cross
Feb 6, 2019
c13a8ae
finish the bomb
Feb 8, 2019
dcbc26a
finish cheat code and boss
Feb 11, 2019
a52c44b
finish the cheat code
Feb 13, 2019
6c3ca4c
finish cheat code
Feb 14, 2019
f70c4ff
fix the start screen
Feb 15, 2019
f599fb3
finish the start screen
Feb 15, 2019
3a531ec
finish the missile and cheat code
Feb 17, 2019
25ca952
make the cheatcode work
Feb 19, 2019
6fbaed1
make the code, missile, and boss work
Feb 19, 2019
a52358d
fix the code
Feb 19, 2019
56c7a9a
fix the damn cheatcode
Feb 20, 2019
26e67ab
THE MISSILE WORKS! also finish the missile, cheat, and boss
Feb 22, 2019
17a9f6e
NOW THE MISSILE REALLY HOMES! finish impact detection, cheatcode, and…
Feb 23, 2019
7f274cd
finish impact detection
Feb 23, 2019
0558284
temporarily satisfied
Feb 25, 2019
e1881d5
temporarily satisfied
Feb 25, 2019
fcf2afa
temporarily satisfied pt 2
Feb 26, 2019
ae3d36b
bouncy missile
Feb 26, 2019
30e320c
work
Feb 26, 2019
5a28ba9
working
Feb 27, 2019
5036a68
zawarudo
Nov 20, 2019
7db2339
ZA WARUDO
chshimotake Nov 20, 2019
489ad74
Set theme jekyll-theme-cayman
chshimotake Nov 20, 2019
f4f5813
Classes reduced
malee31 Nov 22, 2019
9a086e0
Merge pull request #1 from chshimotake/simple
chshimotake Dec 10, 2019
9a31cdc
fixing marvin's chaos
Dec 10, 2019
e6f3418
fix the world
Dec 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
84 changes: 84 additions & 0 deletions Asteroid.pde
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
public class Asteroid extends Floater
{
int topSide=(int)(Math.random()*2+1);
int leftRight=(int)(Math.random()*2+1);
int topDown=(int)(Math.random()*2+1);
int dir=(int)random(0,2);
double ray;
float rand=random(1,5);
public Asteroid()
{
//xCorners=new int[]{-1,-2,-2,-6,-6,-14,-14,-15,-15,-16,-16,-17,-17,-16,-16,-15,-15,-14,-14,-5,-5,-3,-3,-2,-2,2,2,3,3,5,5,14,14,15,15,16,16,17,17,16,16,15,15,14,14,6,6,2,2,1};
//yCorners=new int[]{20,1,2,2,1,1,2,2,15,15,2,2,-10,-10,-11,-11,-10,-10,-9,-11,-16,-16,-10,-9,-11,-11,-9,-10,-16,-16,-11,-9,-10,-10,-11,-11,-10,-10,2,2,15,15,2,2,1,1,2,2,1,20};
yCorners=new int[]{-10,-9,-9,-5,-4,-4,-3,-3,-1,1,3,3,4,4,5,9,9,10,10,9,9,5,4,3,1,-1,-3,-4,-5,-9,-9,-10};
xCorners=new int[]{8,8,1,1,3,7,7,4,5,5,4,7,7,3,1,1,8,8,-8,-8,-1,-1,-3,-4,-5,-5,-4,-3,-1,-1,-8,-8};
corners=Math.min(xCorners.length, yCorners.length);
myColor=color(255,255,255);
if(topSide==0)
{
myCenterX=(int)(Math.random()*990+5);
myCenterY=0;
}
myCenterY=(int)(Math.random()*990+5);
// myDirectionX=(int)(Math.random()*5+1);
// myDirectionY=(int)(Math.random()*5+1);
if(dir==0)
{
myPointDirection=random(5,85);
}else if(dir==1)
{
myPointDirection=random(275,355);
}
ray=(myPointDirection*(Math.PI/180));
myDirectionX=(rand)*Math.cos(ray);
myDirectionY=(rand)*Math.sin(ray);
}
public void setX(int x){myCenterX=x;}
public int getX(){return (int)myCenterX;}
public void setY(int y){myCenterY=y;}
public int getY(){return (int)myCenterY;}
public void setDirectionX(double x){myDirectionX=x;}
public double getDirectionX(){return myDirectionX;}
public void setDirectionY(double y){myDirectionY=y;}
public double getDirectionY(){return myDirectionY;}
public void setPointDirection(int degrees){myPointDirection=degrees;}
public double getPointDirection(){return myPointDirection;}
public void move()
{
super.move();
}
public void appear()
{
if(topSide==1)
{
myCenterX=(int)(Math.random()*990+5);
if(topDown==1)
{
myCenterY=0;
}else if(topDown==2)
{
myCenterY=1000;
}
}else if(topSide==2)
{
if(leftRight==1)
{
myCenterX=0;
}else if(leftRight==2)
{
myCenterX=1000;
}
myCenterY=(int)(Math.random()*990+5);
}
}
public boolean cloDet(int box, int boy)
{
//ALERT! You can use operator overiding for this and bomDet()
return dist(box, boy, (float)myCenterX, (float)myCenterY)<=20;
}
public boolean bomDet(int box, int boy, int sphe)
{
//if(dist(box, boy, this.getX(), this.getY())>sphe+5||dist(box, boy, this.getX(), this.getY())<sphe-5)
return dist(box, boy, (float)myCenterX, (float)myCenterY)<=sphe;
}
}
Loading