Revisão 17
blackmatter trail
| processing/blacklight/Blackmatter.pde | ||
|---|---|---|
| 11 | 11 |
{
|
| 12 | 12 |
int x = 0; |
| 13 | 13 |
int y = 0; |
| 14 |
int diameter = 100;
|
|
| 14 |
int diameter = 50;
|
|
| 15 | 15 |
boolean dead = false; |
| 16 | 16 |
|
| 17 | 17 |
void setup () |
| ... | ... | |
| 26 | 26 |
|
| 27 | 27 |
fill (10, 50); |
| 28 | 28 |
noStroke (); |
| 29 |
rect (this.x, this.y, this.diameter, this.diameter); |
|
| 29 |
|
|
| 30 |
ellipse (this.x, this.y, this.diameter, this.diameter); |
|
| 30 | 31 |
|
| 31 |
if (this.diameter < 510)
|
|
| 32 |
this.diameter++;
|
|
| 32 |
if (this.diameter > 0)
|
|
| 33 |
this.diameter--;
|
|
| 33 | 34 |
|
| 34 | 35 |
|
| 35 | 36 |
} |
| 36 | 37 |
|
| 37 | 38 |
boolean check () |
| 38 | 39 |
{
|
| 40 |
if (this.diameter <= 0) |
|
| 41 |
return true; |
|
| 42 |
|
|
| 39 | 43 |
return false; |
| 40 | 44 |
|
| 41 | 45 |
/* |
| ... | ... | |
| 63 | 67 |
return false; |
| 64 | 68 |
*/ |
| 65 | 69 |
} |
| 66 |
} |
|
| 70 |
} |
|
| processing/blacklight/Logo.pde | ||
|---|---|---|
| 19 | 19 |
//println ("drawing!");
|
| 20 | 20 |
fill (255); |
| 21 | 21 |
|
| 22 |
textFont (_bold_, 48);
|
|
| 23 |
text ("BLACK", 10, 48);
|
|
| 24 |
text (whites, 10, 100);
|
|
| 25 |
textFont (_regular_, 48);
|
|
| 26 |
text ("LIGHT", 150, 48);
|
|
| 22 |
textFont (_bold_, 60);
|
|
| 23 |
text ("LIGHT", 10, 55);
|
|
| 24 |
textFont (_bold_, 24);
|
|
| 25 |
text (whites + " cells", 186, 31);
|
|
| 26 |
text ("23 battles", 186, 55);
|
|
| 27 | 27 |
|
| 28 | 28 |
fill (0); |
| 29 |
scale (-1 , 1); |
|
| 30 |
textFont (_bold_, 57); |
|
| 31 |
text ("BLACK", -_game_.width + 12, 55);
|
|
| 32 |
textFont (_bold_, 24); |
|
| 33 |
text (blacks + " cells", -_game_.width + 190, 31); |
|
| 34 |
text ("1 battles", -_game_.width + 190, 55);
|
|
| 29 | 35 |
scale (-1, 1); |
| 30 |
textFont (_bold_, 48); |
|
| 31 |
text ("BLACK", -_game_.width + 10, 48);
|
|
| 32 |
text (blacks, -_game_.width + 10, 100); |
|
| 33 |
textFont (_regular_, 48); |
|
| 34 |
text ("LIGHT", -_game_.width + 150, 48);
|
|
| 35 |
scale (-1, 1); |
|
| 36 | 36 |
} |
| 37 |
} |
|
| 37 |
} |
|
| processing/blacklight/blacklight.pde | ||
|---|---|---|
| 28 | 28 |
|
| 29 | 29 |
|
| 30 | 30 |
println ("the beat starts here.");
|
| 31 |
/* _fs_ = new SoftFullScreen (this);
|
|
| 32 |
_fs_.enter ();*/
|
|
| 31 |
_fs_ = new SoftFullScreen (this); |
|
| 32 |
_fs_.enter (); |
|
| 33 | 33 |
|
| 34 | 34 |
Ess.start (this); |
| 35 | 35 |
_bold_ = loadFont ("Code-Bold-48.vlw");
|
| ... | ... | |
| 51 | 51 |
void draw () |
| 52 | 52 |
{
|
| 53 | 53 |
_game_.draw (); |
| 54 |
} |
|
| 54 |
} |
|
| processing/blacklight/Level.pde | ||
|---|---|---|
| 86 | 86 |
cell.update(0); |
| 87 | 87 |
} |
| 88 | 88 |
|
| 89 |
Blackminion b = (Blackminion) this.blacklord.minions [0]; |
|
| 89 |
for (int j = 0; j < this.blacklord.blackmatter.size (); j++) |
|
| 90 |
{
|
|
| 91 |
Blackmatter b = (Blackmatter) this.blacklord.blackmatter.get (j); |
|
| 90 | 92 |
Cell cell = this.battlefield.getCell (b.x, b.y); |
| 91 | 93 |
cell.update(1); |
| 94 |
} |
|
| 92 | 95 |
|
| 93 |
|
|
| 94 | 96 |
this.scoreboard.draw (); |
| 95 | 97 |
|
| 96 | 98 |
//int balance = this.lightlord.balance (); |
| ... | ... | |
| 193 | 195 |
_game_.lightWins (); |
| 194 | 196 |
} |
| 195 | 197 |
} |
| 196 |
|
|
| 198 |
|
|
| processing/blacklight/Blackminion.pde | ||
|---|---|---|
| 51 | 51 |
if (this.y <= this.diameter + 20) |
| 52 | 52 |
this.y = this.diameter + 20; |
| 53 | 53 |
|
| 54 |
if (this.input.fire () && (this.jammed == false)) |
|
| 55 |
{
|
|
| 54 |
// if (this.input.fire () && (this.jammed == false))
|
|
| 55 |
// {
|
|
| 56 | 56 |
// println ("FIRE!!!");
|
| 57 | 57 |
this.fire (); |
| 58 |
this.jammed = true; |
|
| 59 |
this.timeout = 10; |
|
| 60 |
_game_.playBlackFire (); |
|
| 61 |
} |
|
| 62 |
else if (this.input.bomb () && (this.charging == 0))
|
|
| 58 |
// this.jammed = true;
|
|
| 59 |
// this.timeout = 10;
|
|
| 60 |
// _game_.playBlackFire ();
|
|
| 61 |
// }
|
|
| 62 |
if (this.input.fire () && (this.charging == 0))
|
|
| 63 | 63 |
{
|
| 64 | 64 |
this.bomb (); |
| 65 | 65 |
this.charging = 30; |
| 66 |
_game_.playBlackBomb (); |
|
| 66 |
// _game_.playBlackBomb ();
|
|
| 67 | 67 |
} |
| 68 | 68 |
|
| 69 | 69 |
fill (1); |
| ... | ... | |
| 74 | 74 |
} |
| 75 | 75 |
|
| 76 | 76 |
void fire () |
| 77 |
{/*
|
|
| 77 |
{
|
|
| 78 | 78 |
|
| 79 | 79 |
Blackmatter matter = new Blackmatter (); |
| 80 | 80 |
|
| ... | ... | |
| 83 | 83 |
|
| 84 | 84 |
matter.setup (); |
| 85 | 85 |
this.blacklord.blackmatter.add (matter); |
| 86 |
*/ |
|
| 86 |
|
|
| 87 | 87 |
} |
| 88 | 88 |
|
| 89 | 89 |
void bomb () |
| 90 |
{/*
|
|
| 90 |
{
|
|
| 91 | 91 |
for (int i = 0; i < 10; i++) |
| 92 | 92 |
{
|
| 93 | 93 |
Blackmatter matter = new Blackmatter (); |
| ... | ... | |
| 97 | 97 |
|
| 98 | 98 |
matter.setup (); |
| 99 | 99 |
this.blacklord.blackmatter.add (matter); |
| 100 |
}*/
|
|
| 100 |
} |
|
| 101 | 101 |
} |
| 102 | 102 |
} |
Também disponível em: Unified diff