public void projectileCollision ( ) {
|
| |
For all world.sectorOneObjects , one item_from_sectorOneObjects at a time { |
| |
if ( ( ( ( ( ( ( item_from_sectorOneObjects .distanceTo( bolt ) ) < ( ( ( subject = generalScreen2 .getWidth() ) + ( subject = generalScreen2 .getHeight() ) ) ) ) || ( ( item_from_sectorOneObjects .distanceTo( bolt ) ) < ( ( ( subject = generalScreen2 .getWidth() ) + ( subject = generalScreen2 .getHeight() ) ) ) ) ) ) || ( ( item_from_sectorOneObjects .distanceTo( bolt ) ) < ( ( ( subject = generalScreen2 .getWidth() ) + ( subject = generalScreen2 .getHeight() ) ) ) ) ) ) ) { |
| |
doTogether { |
| |
lightBlast .moveTo( item_from_sectorOneObjects ); duration = 0 seconds |
| if ( ( Random.nextBoolean() 0.5 (50%) ) ) { |
| |
lightBlast .set( skin texture , lightBlast.lightBlastA ); |
| } else { |
| |
lightBlast .set( skin texture , lightBlast.lightBlastB ); |
| } |
| lightBlast .set( opacity , 1 (100%) ); duration = .05 seconds |
| lightBlast .turnToFace( camera ); duration = 0 seconds |
| lightBlast .moveToward( target = playerHeadView , ( subject = item_from_sectorOneObjects .getWidth() ) ); duration = .01 seconds |
| } |
| world.firing .set( value , false ); |
| lightBlast .set( opacity , 0 (0%) ); duration = 0.1 seconds |
| world.firing .set( value , false ); |
| } else { |
| |
Do Nothing |
| } |
| } |
| } |