-
Notifications
You must be signed in to change notification settings - Fork 4
Damage Tree
The DamageTree class extends AbstractTree implements Tickale and add functinality for projectile Tree objects.
A damage Tree Type for diff trees
private Damage damageTreeType;
A ice tree animation texture list that contain animation per frame
private static final List<TreeStatistics> ICE_TREE_STATS
A acorn tree animation texture list that contain animation per frame
private static final List<TreeStatistics> ACORN_TREE_STATS
A lightning tree animation texture list that contain animation per frame
private static final List<TreeStatistics> LIGHTNING_TREE_STATS
A fire tree animation texture list that contain animation per frame
private static final List<TreeStatistics> FIRE_TREE_STATS
The details of the method are described below
There are three constructors for initializing a damage tree: 1.Initialize a damage tree without texture at a specified coordinate.By default texture,the ```lightningTree`` will be constructed
DamageTree damagetree=new DamageTree(float posX, float posY, float posZ)
2.Initialize a damage tree with specified texture at a specified coordinate.The other properties will be set to default value
DamageTree damagetree=new DamageTree(float posX, float posY, float posZ, Damage texture)
3.Initialize a damage tree with specified texture at a specified coordinate.MaxHealth and demage properties will be set to a damage tree
DamageTree damagetree=new DamageTree(float posX, float posY, float posZ, Damage texture, float maxHealth,float demage)
There is getter method for getting the damage tree type.The function can be activated by:
Damage getDemageTreeType()
You can new a damage tree in specific position with null texture and it will create default damage tree
new DamageTree(16, 11, 0)
or new a damage tree with specific position and texture.The texture is object that indicate which type of damage tree
new DamageTree(16, 11, 0,new IceTree())
The attribute of damage tree allow be added as well.
new DamageTree(16, 11, 0,new IceTree(),1000,10)
//10000 is max health
//10 is the demage
There is a status Hashmap that contain the tree status
static {
status.put("ice_tree","ice_tree-normal");
status.put("acorn_tree1","acorn_tree1-normal");
status.put("lightning_tree1","lightning_tree1-normal");
status.put("fire_tree","fire_tree-normal");
status.put("cactusTree", "cactusTree-normal");
status.put("coralTree", "coralTree-normal");
}
if you want to test tree diff tree state animation ,just please change the string after "-". For example
static {
//set acorn tree animation to death
status.put("ice_tree","ice_tree-normal");
status.put("acorn_tree1","acorn_tree1-death");
status.put("lightning_tree1","lightning_tree1-normal");
status.put("fire_tree","fire_tree-normal");
status.put("cactusTree", "cactusTree-normal");
status.put("coralTree", "coralTree-normal");
}
- Home
- How To Play
- Keybindings
- Inventory and Resources
- Trees
- Portals and Worlds
- Projectiles
- Enemies
- Waves & Spawning
- Graphical assets progress overview
- Audio Files
- Design Templates
- Blender Intro
- Converting 3D models to Sprites
- Scripting in Blender
- Creating a Model in Sketchup
- Colouring and Animating in Blender
- Animation using Dope Sheet, Keyframes and Scale Transformation in Blender
- Template
- Testing
- Terrain
- Terrain Generation
- Resource Trees
- Main Menu, Chat, options
- Main Menu V2, Options V2, Sound
- Damage Trees
- Projectiles
- Enemy User Testing
- Tree planting, inventory GUI, resources, portals
- Caveman Character
- Debug Mode Menu
- Tree learning, Attack Trees, Main Menu Tutorial Resources Styling
- Revamped Resource Trees
- Squirrel User Testing
- Final evaluation
- Project Structure
- Git Workflow
- GUI
- Worlds
- Entity Directions
- Resources
- Inventory
- AbstractEntities
- BasicProperties
- MortalEntity
- ProgressBarEntity
- Multiplayer
- Trees
- TimeEvent
- Game Time
- Animations
- Enemies
- Waves
- Player
- Projectiles
- Effect
- Particles
- Path Manager
- Sounds
- Debug 'God' Mode
- 2D Collision
- Box3D {depreciated}
- Render3D
- Cheat Codes