-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Damage component now also holds information on how to display the…
… impact visually (shape and duration). Not sure if this is best practice but for now its good enough. Also added visual display of the other types of explosions (small, medium, large). WeaponsSystem.java now checks for bounce-information on the projectile (will have to be added when creating projectile)
- Loading branch information
Showing
12 changed files
with
292 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package infinity.es.ship.weapons; | ||
|
||
import com.simsilica.es.EntityComponent; | ||
|
||
/** | ||
* A component that indicates that an entity can bounce a certain number of times. This is used | ||
* on bullets and bombs. | ||
*/ | ||
public class Bounce implements EntityComponent { | ||
|
||
private final int bounces; | ||
|
||
public Bounce(final int bounces) { | ||
this.bounces = bounces; | ||
} | ||
|
||
public int getBounces() { | ||
return bounces; | ||
} | ||
|
||
public Bounce decreaseBounces() { | ||
return new Bounce(bounces - 1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Material Explode2MaterialLight : MatDefs/Multiline/AnimateMultilineSpriteLightShader.j3md { | ||
MaterialParameters { | ||
numTilesX : 7 | ||
numTilesY : 1 | ||
Speed : 20 | ||
numTilesOffsetX : 0 | ||
numTilesOffsetY : 0 | ||
|
||
DiffuseMap : Flip Textures/Subspace/explode0.bm2 | ||
UseMaterialColors : true | ||
Specular : 1.0 1.0 1.0 1.0 | ||
Diffuse : 1.0 1.0 1.0 1.0 | ||
Shininess : 1.0 | ||
|
||
} | ||
AdditionalRenderState { | ||
Blend Alpha | ||
Wireframe Off | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Material Explode2MaterialUnshaded : MatDefs/Multiline/AnimateMultilineSpriteUnshaded.j3md { | ||
MaterialParameters { | ||
ColorMap : Flip Textures/Subspace/explode0.bm2 | ||
numTilesX : 7 | ||
numTilesY : 1 | ||
Speed : 20 | ||
numTilesOffsetX : 0 | ||
numTilesOffsetY : 0 | ||
|
||
} | ||
AdditionalRenderState { | ||
Blend Alpha | ||
Wireframe Off | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Material Explode2MaterialLight : MatDefs/Multiline/AnimateMultilineSpriteLightShader.j3md { | ||
MaterialParameters { | ||
numTilesX : 7 | ||
numTilesY : 1 | ||
Speed : 20 | ||
numTilesOffsetX : 0 | ||
numTilesOffsetY : 0 | ||
|
||
DiffuseMap : Flip Textures/Subspace/explode1.bm2 | ||
UseMaterialColors : true | ||
Specular : 1.0 1.0 1.0 1.0 | ||
Diffuse : 1.0 1.0 1.0 1.0 | ||
Shininess : 1.0 | ||
|
||
} | ||
AdditionalRenderState { | ||
Blend Alpha | ||
Wireframe Off | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Material Explode2MaterialUnshaded : MatDefs/Multiline/AnimateMultilineSpriteUnshaded.j3md { | ||
MaterialParameters { | ||
ColorMap : Flip Textures/Subspace/explode1.bm2 | ||
numTilesX : 7 | ||
numTilesY : 1 | ||
Speed : 20 | ||
numTilesOffsetX : 0 | ||
numTilesOffsetY : 0 | ||
|
||
} | ||
AdditionalRenderState { | ||
Blend Alpha | ||
Wireframe Off | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.