Building - Center calculation
Posted: 16 Feb 2013, 12:59
Hey Guys.
I just want so show here the concepts of the calculation for one Building that detects wheter it is an Center(then the game loads the Building like Hatchery) or just normal Part of an Building, so just Ground.
Its not 100% finished yet, thats why you dont find it right now in the SVN.
First how the Center-Building is loaded, as an example the Training-Pole:
You can see the Drawcondition is asking wheter this concrete Tile is CenterType.CENTER.
So but how we calculate that CenterType?
Here are the three CenterPattern:
And as an Example for Pattern1 the Algorithm with visualization:
Hope you understand everything ^^
- Flipflop
I just want so show here the concepts of the calculation for one Building that detects wheter it is an Center(then the game loads the Building like Hatchery) or just normal Part of an Building, so just Ground.
Its not 100% finished yet, thats why you dont find it right now in the SVN.
First how the Center-Building is loaded, as an example the Training-Pole:
- {l Code}: {l Select All Code}
<env:object3d width="0.3" height="0.3" depth="0.3" x="0" y="0" z="0"
modelpath="models/buildings/training/trainingpole.j3o"
materialpath="models/buildings/training/trainingpole.j3m" rotation="rota" >
<env:drawcondition>
((ACenterBuildingInfo)$object.getProperty("tileInfo")).getCenterType() == CenterType.CENTER
</env:drawcondition>
</env:object3d>
You can see the Drawcondition is asking wheter this concrete Tile is CenterType.CENTER.
So but how we calculate that CenterType?
Here are the three CenterPattern:
And as an Example for Pattern1 the Algorithm with visualization:
Hope you understand everything ^^
- Flipflop