Made toolbuttons opengl rendered
Not clickable yet Progressbar-filled-animation missing
@ -1085,9 +1085,9 @@
|
||||
<terrainTiles class="java.util.ArrayList">
|
||||
<tileData x="0.58950114" width="7.1790023"/>
|
||||
<tileData x="4.7252517" width="0.24849892"/>
|
||||
<tileData x="6.315257" width="2.1295123"/>
|
||||
<tileData x="8.258523" width="0.5570221"/>
|
||||
<tileData x="19.015753" width="3.0254707"/>
|
||||
<tileData x="6.315257" width="2.1295128"/>
|
||||
<tileData x="8.2385235" width="0.51702213"/>
|
||||
<tileData x="18.99575" width="3.0654736"/>
|
||||
<tileData x="27.318325" width="8.093674"/>
|
||||
</terrainTiles>
|
||||
<ceilingTiles class="java.util.ArrayList">
|
||||
@ -1109,7 +1109,7 @@
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="3.6546671" rightEdge="3.8586671" height="0.815" y="-0.19250003">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="3.9480016" rightEdge="4.1520014" height="0.713" y="-0.24350002">
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="3.9480019" rightEdge="4.1520014" height="0.713" y="-0.24350002">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="4.6280017" rightEdge="4.832001" height="0.484" y="-0.35800004">
|
||||
@ -1142,25 +1142,25 @@
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="9.336376" rightEdge="11.170376" height="0.331" y="0.060000002">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="12.695721" rightEdge="14.657721" height="0.331" y="0.053333335">
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="12.62905" rightEdge="14.59105" height="0.331" y="-0.0066666715">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="10.206878" rightEdge="10.919877" height="0.446" y="0.8999999">
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="10.066872" rightEdge="10.779871" height="0.446" y="0.9066666">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="11.363712" rightEdge="12.509712" height="0.675" y="0.8533331">
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="11.170372" rightEdge="12.316372" height="0.675" y="0.8933331">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="11.321548" rightEdge="11.958548" height="0.318" y="-0.5866666">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="12.303888" rightEdge="12.762888" height="0.586" y="-0.5266666">
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="12.0505495" rightEdge="12.509549" height="0.586" y="-0.44666666">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="14.873224" rightEdge="16.300224" height="0.344" y="-0.14666666">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="13.329891" rightEdge="14.756891" height="0.433" y="0.8866666">
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="13.489897" rightEdge="14.916897" height="0.433" y="0.8733333">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="15.221733" rightEdge="16.011734" height="0.382" y="0.55333334">
|
||||
@ -1184,10 +1184,10 @@
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="29.351357" rightEdge="29.988358" height="0.624" y="-0.28800002">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="30.039848" rightEdge="30.539848" height="0.535" y="-0.3325">
|
||||
<obstacleData floating="false" moving="false" deadly="true" leftEdge="30.039848" rightEdge="30.539848" height="0.535" y="-0.3325">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="true" leftEdge="30.590002" rightEdge="31.303003" height="0.42" y="-0.39000005">
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="30.590002" rightEdge="31.303003" height="0.42" y="-0.39000005">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
</obstacles>
|
||||
@ -1198,5 +1198,209 @@
|
||||
</stars>
|
||||
<energy x="1.4666665" y="-0.45333335"/>
|
||||
</level>
|
||||
<level packId="2" id="15" goalX="31.180042" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
|
||||
<terrainTiles class="java.util.ArrayList">
|
||||
<tileData x="1.2458358" width="8.491672"/>
|
||||
<tileData x="10.988761" width="0.61418533"/>
|
||||
<tileData x="11.857771" width="0.53383255"/>
|
||||
<tileData x="12.841696" width="0.5060158"/>
|
||||
<tileData x="15.228531" width="3.3396492"/>
|
||||
<tileData x="18.616825" width="2.296938"/>
|
||||
<tileData x="21.514963" width="0.5873375"/>
|
||||
<tileData x="23.918957" width="2.0686493"/>
|
||||
<tileData x="26.417068" width="0.60757446"/>
|
||||
<tileData x="29.509449" width="3.3411865"/>
|
||||
<tileData x="32.558277" width="2.7564697"/>
|
||||
</terrainTiles>
|
||||
<ceilingTiles class="java.util.ArrayList">
|
||||
<tileData x="14.090023" width="34.180046"/>
|
||||
</ceilingTiles>
|
||||
<obstacles class="java.util.ArrayList">
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="1.4779994" rightEdge="3.541999" height="0.217" y="-0.020000001">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="4.120665" rightEdge="5.0126653" height="0.395" y="-0.40250003">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.6119986" rightEdge="4.987999" height="0.408" y="0.35333326">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="5.0681705" rightEdge="5.425171" height="0.446" y="-0.026666678">
|
||||
<moveComponent length="1.314" rotation="0.0" startOffset="0.283" direction="1.0" speed="0.841" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="5.518672" rightEdge="6.6146717" height="0.331" y="0.38666654">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="false" leftEdge="5.533342" rightEdge="6.033342" height="0.318" y="-0.81333345">
|
||||
<moveComponent length="4.562" rotation="90.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="true" triggerDistance="-0.245"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="7.6026764" rightEdge="8.010677" height="0.306" y="0.3866666">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="8.954851" rightEdge="9.3118515" height="0.28" y="0.55999994">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="10.68369" rightEdge="11.2696905" height="0.306" y="-0.44700003">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="11.6133585" rightEdge="12.1133585" height="0.65" y="-0.27500004">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="12.586696" rightEdge="13.086696" height="1.019" y="-0.0905">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="15.621209" rightEdge="15.9522085" height="0.42" y="-0.39000005">
|
||||
<moveComponent length="1.211" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.51" hasPlayerXSpeed="false" triggerDistance="0.51"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="14.948218" rightEdge="15.305219" height="0.446" y="-0.37700003">
|
||||
<moveComponent length="1.263" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.404" hasPlayerXSpeed="false" triggerDistance="0.531"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="16.260378" rightEdge="16.566378" height="0.51" y="-0.34500003">
|
||||
<moveComponent length="1.186" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.606" hasPlayerXSpeed="false" triggerDistance="0.51"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="16.99785" rightEdge="17.328852" height="0.382" y="-0.40900004">
|
||||
<moveComponent length="1.263" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.697" hasPlayerXSpeed="false" triggerDistance="1.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="17.802853" rightEdge="18.363853" height="0.446" y="-0.37700003">
|
||||
<moveComponent length="1.289" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.803" hasPlayerXSpeed="false" triggerDistance="0.51"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="false" leftEdge="18.771168" rightEdge="19.382168" height="0.229" y="-0.48550004">
|
||||
<moveComponent length="1.366" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.904" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="20.043308" rightEdge="20.323307" height="0.229" y="-0.48550004">
|
||||
<moveComponent length="1.392" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.717" hasPlayerXSpeed="false" triggerDistance="0.449"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="21.284607" rightEdge="21.768608" height="0.357" y="-0.42150003">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="26.176563" rightEdge="26.676563" height="0.344" y="-0.42800003">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="24.991377" rightEdge="25.628378" height="0.166" y="-0.7266666">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="21.905434" rightEdge="22.134434" height="0.268" y="-0.63333327">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="22.346937" rightEdge="22.652937" height="0.28" y="-0.7399999">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="25.769089" rightEdge="26.02409" height="0.395" y="-0.67333317">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="true" deadly="true" leftEdge="30.709" rightEdge="30.964" height="0.28" y="-0.46000004">
|
||||
<moveComponent length="2.139" rotation="90.0" startOffset="0.525" direction="-1.0" speed="1.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
</obstacles>
|
||||
<stars class="java.util.ArrayList">
|
||||
<positionData x="4.8200045" y="-0.013333322"/>
|
||||
<positionData x="13.950037" y="0.7666665"/>
|
||||
<positionData x="19.586649" y="-0.4599999"/>
|
||||
</stars>
|
||||
<energy x="9.126682" y="0.8666665"/>
|
||||
</level>
|
||||
<level packId="2" id="16" goalX="34.76001" startSpeed="0.5" endSpeed="0.5" terrainEdge="-0.6" ceilingEdge="1.0">
|
||||
<terrainTiles class="java.util.ArrayList">
|
||||
<tileData x="7.7578497" width="3.4223652"/>
|
||||
<tileData x="14.044533" width="1.3870001"/>
|
||||
<tileData x="23.205986" width="2.9279003"/>
|
||||
<tileData x="28.029964" width="5.5200615"/>
|
||||
<tileData x="32.099724" width="0.5934582"/>
|
||||
<tileData x="33.163116" width="0.33332825"/>
|
||||
<tileData x="34.07495" width="0.29034424"/>
|
||||
</terrainTiles>
|
||||
<ceilingTiles class="java.util.ArrayList">
|
||||
<tileData x="15.880005" width="37.76001"/>
|
||||
</ceilingTiles>
|
||||
<obstacles class="java.util.ArrayList">
|
||||
<obstacleData floating="true" moving="true" deadly="false" leftEdge="-1.2431667" rightEdge="-0.53016675" height="0.5" y="-1.1066666">
|
||||
<moveComponent length="6.442" rotation="90.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="true" triggerDistance="-0.408"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="false" leftEdge="-0.57733333" rightEdge="0.11066669" height="0.369" y="-0.25999996">
|
||||
<moveComponent length="10.0" rotation="90.0" startOffset="0.0" direction="1.0" speed="0.907" hasPlayerXSpeed="false" triggerDistance="-0.306"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="false" leftEdge="0.20916629" rightEdge="0.7441663" height="0.344" y="0.58666664">
|
||||
<moveComponent length="10.0" rotation="90.0" startOffset="0.0" direction="1.0" speed="0.402" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="2.3454988" rightEdge="2.574499" height="0.242" y="-0.63999987">
|
||||
<moveComponent length="2.036" rotation="90.0" startOffset="0.0" direction="1.0" speed="0.21" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="6.661017" rightEdge="6.8390174" height="0.255" y="0.20000003">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="9.123349" rightEdge="9.40335" height="0.395" y="0.17333336">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="4.5433307" rightEdge="4.8233304" height="0.242" y="0.9266667">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="6.977016" rightEdge="7.2830157" height="0.268" y="0.8866666">
|
||||
<moveComponent length="2.242" rotation="90.0" startOffset="0.0" direction="1.0" speed="0.609" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="false" leftEdge="9.615187" rightEdge="10.5581875" height="0.255" y="-1.0400001">
|
||||
<moveComponent length="2.732" rotation="53.717" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="true" triggerDistance="-0.469"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="12.462691" rightEdge="13.150691" height="0.306" y="0.35333335">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="13.270035" rightEdge="14.850035" height="0.369" y="0.0933333">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="13.810037" rightEdge="14.310037" height="0.178" y="0.42000008">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="false" leftEdge="16.429995" rightEdge="16.929995" height="0.311" y="-0.7466664">
|
||||
<moveComponent length="1.34" rotation="46.178" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="true" triggerDistance="-0.245"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="17.138186" rightEdge="18.335184" height="0.803" y="0.9599997">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="18.430843" rightEdge="20.035843" height="0.981" y="0.6933331">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="20.231983" rightEdge="21.607983" height="1.338" y="0.7999998">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="17.744852" rightEdge="18.94185" height="0.293" y="-0.5999998">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="19.526655" rightEdge="19.806654" height="0.28" y="-0.27333325">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="19.91481" rightEdge="20.83181" height="0.344" y="-1.0533333">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="24.024763" rightEdge="24.661764" height="0.497" y="-0.35150003">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="24.722425" rightEdge="24.977427" height="0.28" y="0.25333324">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="25.023262" rightEdge="25.30326" height="0.357" y="-0.06666666">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="24.750261" rightEdge="25.056261" height="0.178" y="-0.3866666">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="true" leftEdge="24.876595" rightEdge="25.156593" height="0.318" y="-0.7333333">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="true" deadly="false" leftEdge="25.333199" rightEdge="25.833199" height="0.242" y="-0.47900003">
|
||||
<moveComponent length="5.619" rotation="90.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="true" triggerDistance="-0.224"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="26.534367" rightEdge="27.145367" height="0.293" y="-0.12000001">
|
||||
<moveComponent length="0.0" rotation="0.0" startOffset="0.0" direction="1.0" speed="0.0" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="true" deadly="true" leftEdge="28.905712" rightEdge="29.160713" height="0.344" y="-0.08666667">
|
||||
<moveComponent length="1.418" rotation="90.0" startOffset="0.318" direction="1.0" speed="0.293" hasPlayerXSpeed="false" triggerDistance="0.0"/>
|
||||
</obstacleData>
|
||||
</obstacles>
|
||||
<stars class="java.util.ArrayList">
|
||||
<positionData x="10.060024" y="0.1933333"/>
|
||||
<positionData x="16.063366" y="-0.09333336"/>
|
||||
<positionData x="25.593235" y="-0.17333335"/>
|
||||
</stars>
|
||||
<energy x="2.4833322" y="0.9333333"/>
|
||||
</level>
|
||||
</levels>
|
||||
</levelPack>
|
51
app/src/main/assets/shader/guiFragmentShader.glsl
Normal file
@ -0,0 +1,51 @@
|
||||
precision mediump float;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform float useCustomColor;
|
||||
uniform vec4 color;
|
||||
uniform float roundValue;
|
||||
uniform float visibleAmount;
|
||||
|
||||
varying vec2 pass_TexCoords;
|
||||
|
||||
float isInRoundedRange();
|
||||
float isInVisiblePart();
|
||||
|
||||
void main() {
|
||||
|
||||
if(isInRoundedRange() == 1.0 && isInVisiblePart() == 1.0){
|
||||
if(useCustomColor == 1.0){
|
||||
gl_FragColor = color;
|
||||
} else {
|
||||
gl_FragColor = texture2D(texture, pass_TexCoords);
|
||||
}
|
||||
|
||||
gl_FragColor.rgb = gl_FragColor.rgb / gl_FragColor.a;
|
||||
} else {
|
||||
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
float isInRoundedRange(){
|
||||
if(roundValue == 0.0)
|
||||
return 1.0;
|
||||
float relativeX = abs((pass_TexCoords.x- 0.5));
|
||||
float relativeY = abs(pass_TexCoords.y - 0.5);
|
||||
float circleX = abs(roundValue * 0.5 - 0.5);
|
||||
float circleY = abs(roundValue * 0.5 - 0.5);
|
||||
if(relativeX < circleX || relativeY < circleY)
|
||||
return 1.0;
|
||||
float radius = roundValue * 0.5;
|
||||
float distX = relativeX - circleX;
|
||||
float distY = relativeY - circleY;
|
||||
if(distX * distX + distY * distY > radius * radius)
|
||||
return 0.0;
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
float isInVisiblePart(){
|
||||
if(pass_TexCoords.x >= visibleAmount)
|
||||
return 1.0;
|
||||
return 0.0;
|
||||
}
|
@ -3,30 +3,30 @@ package de.frajul.endlessroll.data;
|
||||
/**
|
||||
* Created by Julian on 02.08.2016.
|
||||
*/
|
||||
public class Color {
|
||||
public class Color3f {
|
||||
|
||||
private float r, g, b;
|
||||
|
||||
public Color() {
|
||||
public Color3f() {
|
||||
}
|
||||
|
||||
public Color(float r, float g, float b) {
|
||||
public Color3f(float r, float g, float b) {
|
||||
this.r = r;
|
||||
this.g = g;
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
public Color(Color other) {
|
||||
public Color3f(Color3f other) {
|
||||
this.r = other.getR();
|
||||
this.g = other.getG();
|
||||
this.b = other.getB();
|
||||
}
|
||||
|
||||
public Color interpolate(float leftValue, float rightValue, Color color2) {
|
||||
public Color3f interpolate(float leftValue, float rightValue, Color3f color2) {
|
||||
float r = this.r + (color2.r - this.r) * leftValue;
|
||||
float g = this.g + (color2.g - this.g) * leftValue;
|
||||
float b = this.b + (color2.b - this.b) * leftValue;
|
||||
return new Color(r, g, b);
|
||||
return new Color3f(r, g, b);
|
||||
}
|
||||
|
||||
private void mul(float a) {
|
||||
@ -35,7 +35,7 @@ public class Color {
|
||||
b *= a;
|
||||
}
|
||||
|
||||
private void add(Color other) {
|
||||
private void add(Color3f other) {
|
||||
r += other.getR();
|
||||
g += other.getG();
|
||||
b += other.getB();
|
58
app/src/main/java/de/frajul/endlessroll/data/Color4f.java
Normal file
@ -0,0 +1,58 @@
|
||||
package de.frajul.endlessroll.data;
|
||||
|
||||
/**
|
||||
* Created by Julian on 02.08.2016.
|
||||
*/
|
||||
public class Color4f {
|
||||
|
||||
private float r, g, b, a;
|
||||
|
||||
public Color4f() {
|
||||
}
|
||||
|
||||
public Color4f(float r, float g, float b, float a) {
|
||||
this.r = r;
|
||||
this.g = g;
|
||||
this.b = b;
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public Color4f(Color4f other) {
|
||||
this.r = other.getR();
|
||||
this.g = other.getG();
|
||||
this.b = other.getB();
|
||||
this.a = other.getA();
|
||||
}
|
||||
|
||||
public float getR() {
|
||||
return r;
|
||||
}
|
||||
|
||||
public void setR(float r) {
|
||||
this.r = r;
|
||||
}
|
||||
|
||||
public float getG() {
|
||||
return g;
|
||||
}
|
||||
|
||||
public void setG(float g) {
|
||||
this.g = g;
|
||||
}
|
||||
|
||||
public float getB() {
|
||||
return b;
|
||||
}
|
||||
|
||||
public void setB(float b) {
|
||||
this.b = b;
|
||||
}
|
||||
|
||||
public float getA() {
|
||||
return a;
|
||||
}
|
||||
|
||||
public void setA(float a) {
|
||||
this.a = a;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package de.frajul.endlessroll.entities;
|
||||
package de.frajul.endlessroll.entities.guis;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@ -13,7 +13,7 @@ import de.frajul.endlessroll.sounds.SoundStream;
|
||||
/**
|
||||
* Created by Julian on 31.07.2016.
|
||||
*/
|
||||
public class Countdown extends Entity {
|
||||
public class Countdown extends Gui {
|
||||
|
||||
private Game game;
|
||||
private SoundManager soundManager;
|
@ -0,0 +1,33 @@
|
||||
package de.frajul.endlessroll.entities.guis;
|
||||
|
||||
import de.frajul.endlessroll.data.Color4f;
|
||||
import de.frajul.endlessroll.data.Vector;
|
||||
import de.frajul.endlessroll.entities.Entity;
|
||||
import de.frajul.endlessroll.entities.textures.Texture;
|
||||
|
||||
public class Gui extends Entity {
|
||||
|
||||
protected float roundValue = 0;
|
||||
protected Color4f color = null;
|
||||
|
||||
public Gui(Texture texture, Vector position, float width, float height) {
|
||||
super(texture, position, width, height);
|
||||
}
|
||||
|
||||
public float getRoundValue() {
|
||||
return roundValue;
|
||||
}
|
||||
|
||||
public void setRoundValue(float roundValue) {
|
||||
this.roundValue = roundValue;
|
||||
}
|
||||
|
||||
public Color4f getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(Color4f color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package de.frajul.endlessroll.entities.guis;
|
||||
|
||||
import de.frajul.endlessroll.data.Vector;
|
||||
import de.frajul.endlessroll.entities.textures.Texture;
|
||||
import de.frajul.endlessroll.main.GameLog;
|
||||
|
||||
public class Progressbar extends Gui {
|
||||
|
||||
private float maxTime;
|
||||
private float progress;
|
||||
|
||||
public Progressbar(Texture texture, Vector position, float width, float height, float maxTime) {
|
||||
super(texture, position, width, height);
|
||||
this.maxTime = maxTime;
|
||||
}
|
||||
|
||||
public void update(float frameTime){
|
||||
progress += frameTime / maxTime;
|
||||
if (progress >= 1f)
|
||||
progress = 1f;
|
||||
}
|
||||
|
||||
public boolean hasFinished(){
|
||||
return progress == 1;
|
||||
}
|
||||
|
||||
public float getProgress() {
|
||||
return progress;
|
||||
}
|
||||
|
||||
public void setProgress(float progress) {
|
||||
this.progress = progress;
|
||||
}
|
||||
|
||||
public float getMaxTime() {
|
||||
return maxTime;
|
||||
}
|
||||
|
||||
public void setMaxTime(float maxTime) {
|
||||
this.maxTime = maxTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,127 @@
|
||||
package de.frajul.endlessroll.entities.guis;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import de.frajul.endlessroll.data.Color4f;
|
||||
import de.frajul.endlessroll.data.Vector;
|
||||
import de.frajul.endlessroll.entities.textures.Texture;
|
||||
import de.frajul.endlessroll.entities.textures.TexturePack;
|
||||
import de.frajul.endlessroll.entities.tools.ToolSlot;
|
||||
import de.frajul.endlessroll.entities.tools.ToolType;
|
||||
import de.frajul.endlessroll.entities.tools.ToolUpgradeType;
|
||||
import de.frajul.endlessroll.main.game.Game;
|
||||
|
||||
public class ToolButton {
|
||||
|
||||
private final Color4f LOCKED = new Color4f(0.29f, 0.29f, 0.29f, 0.9f);
|
||||
private final Color4f ACTIVE_READY = new Color4f(0.25f, 0.89f, 0.17f, 0.9f);
|
||||
private final Color4f ACTIVE_NOT_READY = new Color4f(0.86f, 0.08f, 0.13f, 0.9f);
|
||||
private final Color4f INACTIVE_READY = new Color4f(1.0f, 0.95f, 0.0f, 0.9f);
|
||||
private final Color4f INACTIVE_NOT_READY = new Color4f(0.57f, 0.11f, 0.06f, 0.9f);
|
||||
|
||||
private Gui border;
|
||||
private Gui background;
|
||||
private Progressbar progressbar;
|
||||
|
||||
private Game game;
|
||||
private ToolType toolType;
|
||||
private boolean locked;
|
||||
private AtomicBoolean active;
|
||||
private Texture toolButtonLockedTexture;
|
||||
private Texture toolButtonEmptyTexture;
|
||||
|
||||
public ToolButton(Vector position, float width, float height, TexturePack texturePack, Game game) {
|
||||
this.game = game;
|
||||
active = new AtomicBoolean(false);
|
||||
toolButtonLockedTexture = texturePack.toolButtonLocked;
|
||||
toolButtonEmptyTexture = texturePack.toolButtonEmpty;
|
||||
|
||||
border = new Gui(texturePack.white, position, width, height);
|
||||
border.setRoundValue(0.3f);
|
||||
background = new Gui(null, position, height, height);
|
||||
progressbar = new Progressbar(texturePack.white, position, height, height, 0);
|
||||
progressbar.setColor(new Color4f(0.55f, 0.55f, 0.55f, 0.62f));
|
||||
progressbar.setRoundValue(1);
|
||||
progressbar.setProgress(0.6f);
|
||||
}
|
||||
|
||||
public void setToolSlot(ToolSlot toolSlot) {
|
||||
this.toolType = toolSlot.getToolType();
|
||||
this.locked = toolSlot.isLocked();
|
||||
|
||||
if (locked)
|
||||
background.setTexture(toolButtonLockedTexture);
|
||||
else if (toolType == null)
|
||||
background.setTexture(toolButtonEmptyTexture);
|
||||
else
|
||||
background.setTexture(toolType.getToolButtonTexture());
|
||||
|
||||
if (toolType != null)
|
||||
progressbar.setMaxTime(toolType.getCurrentUpgradeValue(ToolUpgradeType.COOLDOWN));
|
||||
|
||||
if (locked || toolType == null)
|
||||
border.setColor(LOCKED);
|
||||
else
|
||||
border.setColor(INACTIVE_NOT_READY);
|
||||
}
|
||||
|
||||
public void setProgress(float progress) {
|
||||
progressbar.setProgress(progress);
|
||||
updateBorderColor();
|
||||
}
|
||||
|
||||
public boolean hasFinishedLoading() {
|
||||
return progressbar.hasFinished();
|
||||
}
|
||||
|
||||
public void update(float frameTime) {
|
||||
if (progressbar.hasFinished())
|
||||
return;
|
||||
progressbar.update(frameTime);
|
||||
if (progressbar.hasFinished()) {
|
||||
if (active.get())
|
||||
game.onToolButtonFinishedLoading(toolType);
|
||||
}
|
||||
updateBorderColor();
|
||||
}
|
||||
|
||||
public synchronized void updateBorderColor() {
|
||||
if (!locked && toolType != null) {
|
||||
if (active.get()) {
|
||||
if (progressbar.hasFinished())
|
||||
border.setColor(ACTIVE_READY);
|
||||
else
|
||||
border.setColor(ACTIVE_NOT_READY);
|
||||
} else {
|
||||
if (progressbar.hasFinished())
|
||||
border.setColor(INACTIVE_READY);
|
||||
else
|
||||
border.setColor(INACTIVE_NOT_READY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setActive(boolean active) {
|
||||
this.active.set(active);
|
||||
}
|
||||
|
||||
public AtomicBoolean getActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public Gui getBorder() {
|
||||
return border;
|
||||
}
|
||||
|
||||
public Gui getBackground() {
|
||||
return background;
|
||||
}
|
||||
|
||||
public Progressbar getProgressbar() {
|
||||
return progressbar;
|
||||
}
|
||||
|
||||
public ToolType getToolType() {
|
||||
return toolType;
|
||||
}
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package de.frajul.endlessroll.entities.guis;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.frajul.endlessroll.data.Vector;
|
||||
import de.frajul.endlessroll.entities.textures.TexturePack;
|
||||
import de.frajul.endlessroll.main.game.Game;
|
||||
import de.frajul.endlessroll.user.ToolSlotSettings;
|
||||
import de.frajul.endlessroll.views.ToolButtonView;
|
||||
|
||||
public class ToolButtonBar {
|
||||
|
||||
private final int BUTTON_COUNT = 4;
|
||||
private final float BUTTON_HEIGHT = 0.34f;
|
||||
private final float BUTTON_WIDTH = BUTTON_HEIGHT * 1.17f;
|
||||
private final float BUTTON_MARGIN = 0.012f;
|
||||
|
||||
private List<ToolButton> toolButtons = new ArrayList<>();
|
||||
|
||||
public ToolButtonBar(TexturePack texturePack, Game game, ToolSlotSettings toolSlotSettings) {
|
||||
float buttonWidth = BUTTON_WIDTH + 2 * BUTTON_MARGIN;
|
||||
float totalWidth = BUTTON_COUNT * buttonWidth;
|
||||
|
||||
for (int i = 0; i < BUTTON_COUNT; i++) {
|
||||
Vector position = new Vector(-totalWidth / 2 + (i + 0.5f) * buttonWidth,
|
||||
1 - (0.5f * BUTTON_HEIGHT + BUTTON_MARGIN * 2));
|
||||
ToolButton toolButton = new ToolButton(position, BUTTON_WIDTH, BUTTON_HEIGHT,
|
||||
texturePack, game);
|
||||
toolButton.setToolSlot(toolSlotSettings.get(i));
|
||||
toolButtons.add(toolButton);
|
||||
}
|
||||
}
|
||||
|
||||
public void update(float frameTime) {
|
||||
for (ToolButton button : toolButtons)
|
||||
button.update(frameTime);
|
||||
}
|
||||
|
||||
public void changeToolButtonTypes(ToolSlotSettings toolSlotSettings) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
toolButtons.get(i).setToolSlot(toolSlotSettings.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
public void reset(ToolSlotSettings toolSlotSettings) {
|
||||
changeToolButtonTypes(toolSlotSettings);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (toolSlotSettings.get(i).getToolType() != null) {
|
||||
toolButtons.get(i).setActive(true);
|
||||
toolButtons.get(i).updateBorderColor();
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (ToolButton button : toolButtons)
|
||||
button.setProgress(1);
|
||||
}
|
||||
|
||||
public ToolButton getActiveButton(){
|
||||
for(ToolButton button : toolButtons)
|
||||
if(button.getActive().get())
|
||||
return button;
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<Gui> toGuiList() {
|
||||
List<Gui> list = new ArrayList<>();
|
||||
for (ToolButton button : toolButtons) {
|
||||
list.add(button.getBorder());
|
||||
list.add(button.getBackground());
|
||||
list.add(button.getProgressbar());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@ package de.frajul.endlessroll.entities.particles;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import de.frajul.endlessroll.data.Color;
|
||||
import de.frajul.endlessroll.data.Color3f;
|
||||
import de.frajul.endlessroll.data.Vector;
|
||||
import de.frajul.endlessroll.entities.Entity;
|
||||
import de.frajul.endlessroll.entities.particles.attributes.attributeValues.Range;
|
||||
@ -15,7 +15,7 @@ import de.frajul.endlessroll.main.game.Timer;
|
||||
*/
|
||||
public class Particle extends Entity {
|
||||
|
||||
private Color color;
|
||||
private Color3f color;
|
||||
private Random random;
|
||||
private boolean active;
|
||||
private float maxLife;
|
||||
@ -101,11 +101,11 @@ public class Particle extends Entity {
|
||||
return active;
|
||||
}
|
||||
|
||||
public void setColor(Color color) {
|
||||
public void setColor(Color3f color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Color getColor() {
|
||||
public Color3f getColor() {
|
||||
return color;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package de.frajul.endlessroll.entities.particles.attributes.attributeValues;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import de.frajul.endlessroll.data.Color;
|
||||
import de.frajul.endlessroll.data.Color3f;
|
||||
|
||||
/**
|
||||
* Created by Julian on 02.08.2016.
|
||||
@ -30,7 +30,7 @@ public class TintTimeline extends ParticleAttributeValue {
|
||||
points.get(index).setTime(time);
|
||||
}
|
||||
|
||||
public Color getValueAtTime(float time) {
|
||||
public Color3f getValueAtTime(float time) {
|
||||
TintTimelinePoint left = null, right = null;
|
||||
for (TintTimelinePoint point : points) {
|
||||
if (point.getTime() <= time) {
|
||||
@ -51,7 +51,7 @@ public class TintTimeline extends ParticleAttributeValue {
|
||||
}
|
||||
return left.getColor();
|
||||
}
|
||||
return new Color();
|
||||
return new Color3f();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
package de.frajul.endlessroll.entities.particles.attributes.attributeValues;
|
||||
|
||||
import de.frajul.endlessroll.data.Color;
|
||||
import de.frajul.endlessroll.data.Color3f;
|
||||
|
||||
public class TintTimelinePoint {
|
||||
|
||||
private float time;
|
||||
private Color color;
|
||||
private Color3f color;
|
||||
|
||||
public float getTime() {
|
||||
return time;
|
||||
@ -15,13 +15,13 @@ public class TintTimelinePoint {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public Color getColor() {
|
||||
public Color3f getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setValue(int colorIndex, float value) {
|
||||
if (color == null)
|
||||
color = new Color();
|
||||
color = new Color3f();
|
||||
if (colorIndex == 0)
|
||||
color.setR(value);
|
||||
else if (colorIndex == 1)
|
||||
|
@ -14,19 +14,19 @@ import de.frajul.endlessroll.entities.textures.TexturePack;
|
||||
public enum PlayerShape {
|
||||
BALL(R.string.playershape_name_ball, R.string.playershape_description_ball,
|
||||
R.drawable.playershapes_ball, new EmptyTask()),
|
||||
CLOCK(R.string.playershape_name_clock, R.string.playershape_description_clock,
|
||||
R.drawable.playershapes_clock, new CollectStarTask(15)),
|
||||
HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral,
|
||||
R.string.playershape_description_hypno_spiral, R.drawable.playershapes_hypno_spiral,
|
||||
new CollectEnergyTask(3)),
|
||||
PACMAN(R.string.playershape_name_pacman, R.string.playershape_description_pacman,
|
||||
R.drawable.playershapes_pacman, new CompleteWorldTask(1)),
|
||||
SMILEY(R.string.playershape_name_smiley, R.string.playershape_description_smiley,
|
||||
R.drawable.playershapes_smiley, new CollectStarTask(30)),
|
||||
WHEEL(R.string.playershape_name_wheel, R.string.playershape_description_wheel,
|
||||
R.drawable.playershapes_wheel, new CollectStarTask(45)),
|
||||
CLOCK(R.string.playershape_name_clock, R.string.playershape_description_clock,
|
||||
R.drawable.playershapes_clock, new CollectStarTask(15)),
|
||||
SUN(R.string.playershape_name_sun, R.string.playershape_description_sun,
|
||||
R.drawable.playershapes_sun, new CollectEnergyTask(10)),
|
||||
SMILEY(R.string.playershape_name_smiley, R.string.playershape_description_smiley,
|
||||
R.drawable.playershapes_smiley, new CollectStarTask(30)),
|
||||
PACMAN(R.string.playershape_name_pacman, R.string.playershape_description_pacman,
|
||||
R.drawable.playershapes_pacman, new CompleteWorldTask(1)),
|
||||
WHEEL(R.string.playershape_name_wheel, R.string.playershape_description_wheel,
|
||||
R.drawable.playershapes_wheel, new CollectStarTask(45)),
|
||||
BLUE(R.string.playershape_name_blue, R.string.playershape_description_blue,
|
||||
R.drawable.jury_playershapes_ball_omg_im_blue, new CompleteWorldTask(2));
|
||||
|
||||
|
@ -15,23 +15,29 @@ public class TexturePack {
|
||||
|
||||
private TextureLoader loader;
|
||||
|
||||
public final Texture white;
|
||||
public final Texture goal;
|
||||
public final Texture playerArrow;
|
||||
public final Texture star;
|
||||
public final Texture energy;
|
||||
public final Texture countdown3, countdown2, countdown1;
|
||||
public final Texture toolButtonLocked;
|
||||
public final Texture toolButtonEmpty;
|
||||
|
||||
public TexturePack(Context context) {
|
||||
loader = new TextureLoader(context);
|
||||
white = loadTexture(R.drawable.white);
|
||||
goal = loadTexture(R.drawable.guis_goal);
|
||||
playerArrow = loadTexture(R.drawable.guis_playerarrow);
|
||||
|
||||
star = loadTexture(R.drawable.currency_star);
|
||||
energy = loadAtlas(R.drawable.currency_energy_atlas, 2, 2);
|
||||
|
||||
countdown3 = loadTexture(R.drawable.countdown_3);
|
||||
countdown2 = loadTexture(R.drawable.countdown_2);
|
||||
countdown1 = loadTexture(R.drawable.countdown_1);
|
||||
countdown3 = loadTexture(R.drawable.guis_countdown_3);
|
||||
countdown2 = loadTexture(R.drawable.guis_countdown_2);
|
||||
countdown1 = loadTexture(R.drawable.guis_countdown_1);
|
||||
toolButtonLocked = loadTexture(R.drawable.tools_button_locked);
|
||||
toolButtonEmpty = loadTexture(R.drawable.tools_button_empty);
|
||||
|
||||
PlayerShape.loadAllTextures(this);
|
||||
ToolType.loadAllToolTextures(this);
|
||||
|
@ -52,6 +52,7 @@ public enum ToolType {
|
||||
private final List<ToolUpgrade> upgrades;
|
||||
|
||||
private Texture toolTexture = null;
|
||||
private Texture toolButtonTexture = null;
|
||||
private boolean bought;
|
||||
private int currentUpgradeLevel = 1;
|
||||
|
||||
@ -95,8 +96,9 @@ public enum ToolType {
|
||||
}
|
||||
|
||||
public static void loadAllToolTextures(TexturePack texturePack) {
|
||||
for (ToolType type : values())
|
||||
for (ToolType type : values()){
|
||||
type.loadToolTexture(texturePack);
|
||||
type.loadToolButtonTexture(texturePack);}
|
||||
}
|
||||
|
||||
private void loadToolTexture(TexturePack texturePack) {
|
||||
@ -108,10 +110,20 @@ public enum ToolType {
|
||||
toolTexture = texturePack.loadTexture(toolTextureId);
|
||||
}
|
||||
|
||||
private void loadToolButtonTexture(TexturePack texturePack){
|
||||
if (buttonDrawable == -1)
|
||||
return;
|
||||
toolButtonTexture = texturePack.loadTexture(buttonDrawable);
|
||||
}
|
||||
|
||||
public Texture getToolTexture() {
|
||||
return toolTexture;
|
||||
}
|
||||
|
||||
public Texture getToolButtonTexture() {
|
||||
return toolButtonTexture;
|
||||
}
|
||||
|
||||
public int getButtonDrawable() {
|
||||
return buttonDrawable;
|
||||
}
|
||||
|
@ -30,7 +30,6 @@ public class DataStorageHandler {
|
||||
private final String USER_PLAYER_SHAPE = "PlayerShape";
|
||||
private final String TOOL_SHOP_TUTORIAL_FINISHED = "ToolShopTutorialFinished";
|
||||
private final String SHOW_FPS = "ShowFps";
|
||||
private final String PERFORMANCE_BOOST = "PerformanceBoost";
|
||||
|
||||
private SharedPreferences preferences;
|
||||
private MyDatabase database;
|
||||
@ -50,16 +49,6 @@ public class DataStorageHandler {
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public boolean readIsPerformanceBoost() {
|
||||
return preferences.getBoolean(PERFORMANCE_BOOST, false);
|
||||
}
|
||||
|
||||
public void writePerformanceBoost(boolean performanceBoost) {
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putBoolean(PERFORMANCE_BOOST, performanceBoost);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public boolean readIsSoundsMuted() {
|
||||
return preferences.getBoolean(SOUNDS_MUTED, false);
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ import de.frajul.endlessroll.entities.Player;
|
||||
import de.frajul.endlessroll.entities.collectables.Energy;
|
||||
import de.frajul.endlessroll.entities.collectables.Star;
|
||||
import de.frajul.endlessroll.entities.collision.CollisionManager;
|
||||
import de.frajul.endlessroll.entities.guis.ToolButton;
|
||||
import de.frajul.endlessroll.entities.guis.ToolButtonBar;
|
||||
import de.frajul.endlessroll.entities.particles.Firework;
|
||||
import de.frajul.endlessroll.entities.particles.ParticleSystem;
|
||||
import de.frajul.endlessroll.entities.textures.TexturePack;
|
||||
@ -29,9 +31,9 @@ import de.frajul.endlessroll.main.screens.GameScreen;
|
||||
import de.frajul.endlessroll.main.screens.Screen;
|
||||
import de.frajul.endlessroll.rendering.Rendering;
|
||||
import de.frajul.endlessroll.sqlDatabase.MyDatabase;
|
||||
import de.frajul.endlessroll.entities.Countdown;
|
||||
import de.frajul.endlessroll.views.ToolButton;
|
||||
import de.frajul.endlessroll.views.ToolButtonBar;
|
||||
import de.frajul.endlessroll.entities.guis.Countdown;
|
||||
import de.frajul.endlessroll.views.ToolButtonView;
|
||||
import de.frajul.endlessroll.views.ToolButtonBarView;
|
||||
import de.frajul.endlessroll.views.ViewManager;
|
||||
|
||||
/**
|
||||
@ -46,6 +48,7 @@ public class Game extends Rendering<GameScene> {
|
||||
private ParticleSystem particleSystem;
|
||||
private Firework firework;
|
||||
private Countdown countdown;
|
||||
private ToolButtonBar toolButtonBar;
|
||||
|
||||
private ToolType currentTool;
|
||||
private Player player;
|
||||
@ -77,6 +80,8 @@ public class Game extends Rendering<GameScene> {
|
||||
scene = new GameScene(gameActivity, texturePack, particleSystem);
|
||||
firework = new Firework(particleSystem.firework, scene.getCamera());
|
||||
countdown = new Countdown(this, gameActivity.getSoundManager(), texturePack);
|
||||
toolButtonBar = new ToolButtonBar(texturePack, this, gameActivity.getUser().getToolSlotSettings());
|
||||
scene.getGuis().addAll(toolButtonBar.toGuiList());
|
||||
scene.getGuis().add(countdown);
|
||||
if (level != null)
|
||||
startGame(levelPack, level);
|
||||
@ -107,11 +112,10 @@ public class Game extends Rendering<GameScene> {
|
||||
scene.loadLevel(level, levelPack.getWorld(),
|
||||
gameActivity.getUser().getCurrentPlayerShape());
|
||||
player = scene.getPlayer();
|
||||
viewManager.resetViews(gameActivity.getUser());
|
||||
setCurrentTool(viewManager.toolButtonBar.getActiveButton().getToolType(), true);
|
||||
viewManager.resetViews();
|
||||
toolButtonBar.reset(gameActivity.getUser().getToolSlotSettings());
|
||||
setCurrentTool(toolButtonBar.getActiveButton().getToolType(), true);
|
||||
viewManager.setShowFps(gameActivity.getDataStorageHandler().readIsShowFps());
|
||||
viewManager
|
||||
.setBoostPerformance(gameActivity.getDataStorageHandler().readIsPerformanceBoost());
|
||||
countdown.start();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@ -142,6 +146,8 @@ public class Game extends Rendering<GameScene> {
|
||||
viewManager.update(gameState == GameState.RUNNING, timer, playerProgress);
|
||||
switch (gameState) {
|
||||
case RUNNING:
|
||||
toolButtonBar.update(timer.getFrameTimeSeconds());
|
||||
|
||||
if (player.getPosition().y < -2f) {
|
||||
onGameOver(false);
|
||||
return;
|
||||
@ -170,9 +176,8 @@ public class Game extends Rendering<GameScene> {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
if (gameState == GameState.RUNNING) {
|
||||
ToolButtonBar bar = viewManager.toolButtonBar;
|
||||
ToolButton button = bar.getByToolType(currentTool);
|
||||
if (button != null && button.finishedLoading() && button.getToolType() != null) {
|
||||
ToolButton currentToolButton = toolButtonBar.getActiveButton();
|
||||
if (currentToolButton != null && currentToolButton.hasFinishedLoading() && currentToolButton.getToolType() != null) {
|
||||
if (event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
if (currentTool == ToolType.BOMB) {
|
||||
try {
|
||||
@ -183,7 +188,7 @@ public class Game extends Rendering<GameScene> {
|
||||
viewManager.showBombErrorMessage(event.getX(), event.getY());
|
||||
return true;
|
||||
} else {
|
||||
button.setProgress(0);
|
||||
currentToolButton.setProgress(0);
|
||||
scene.getBombSelected().set(false);
|
||||
Tool tool = addTool(event.getX(), event.getY());
|
||||
if (tool != null && tool instanceof Bomb)
|
||||
@ -195,7 +200,7 @@ public class Game extends Rendering<GameScene> {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
button.setProgress(0);
|
||||
currentToolButton.setProgress(0);
|
||||
addTool(event.getX(), event.getY());
|
||||
}
|
||||
}
|
||||
@ -205,15 +210,14 @@ public class Game extends Rendering<GameScene> {
|
||||
}
|
||||
|
||||
public void resetViews() {
|
||||
viewManager.resetViews(gameActivity.getUser());
|
||||
viewManager.resetViews();
|
||||
toolButtonBar.reset(gameActivity.getUser().getToolSlotSettings());
|
||||
}
|
||||
|
||||
public void continueGame() {
|
||||
viewManager.hideShortMenu();
|
||||
gameState = GameState.COUNTDOWN;
|
||||
viewManager.setShowFps(gameActivity.getDataStorageHandler().readIsShowFps());
|
||||
viewManager
|
||||
.setBoostPerformance(gameActivity.getDataStorageHandler().readIsPerformanceBoost());
|
||||
countdown.start();
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,7 @@ import de.frajul.endlessroll.entities.Entity;
|
||||
import de.frajul.endlessroll.entities.Obstacle;
|
||||
import de.frajul.endlessroll.entities.Player;
|
||||
import de.frajul.endlessroll.entities.collectables.Collectables;
|
||||
import de.frajul.endlessroll.entities.guis.Gui;
|
||||
import de.frajul.endlessroll.entities.particles.ParticleSource;
|
||||
import de.frajul.endlessroll.entities.particles.ParticleSystem;
|
||||
import de.frajul.endlessroll.entities.textures.TexturePack;
|
||||
@ -51,7 +52,7 @@ public abstract class Scene {
|
||||
protected final List<Obstacle> obstacles = Collections.synchronizedList(new ArrayList<Obstacle>());
|
||||
protected final List<Tool> tools = Collections.synchronizedList(new ArrayList<Tool>());
|
||||
protected Collectables collectables = new Collectables();
|
||||
protected final List<Entity> guis = Collections.synchronizedList(new ArrayList<Entity>());
|
||||
protected final List<Gui> guis = Collections.synchronizedList(new ArrayList<Gui>());
|
||||
|
||||
public Scene(GameActivity gameActivity, TexturePack texturePack, ParticleSystem particleSystem) {
|
||||
this.gameActivity = gameActivity;
|
||||
@ -193,7 +194,7 @@ public abstract class Scene {
|
||||
return collectables;
|
||||
}
|
||||
|
||||
public synchronized List<Entity> getGuis() {
|
||||
public synchronized List<Gui> getGuis() {
|
||||
return guis;
|
||||
}
|
||||
|
||||
|
@ -2,21 +2,29 @@ package de.frajul.endlessroll.main.game;
|
||||
|
||||
import de.frajul.endlessroll.data.Vector;
|
||||
import de.frajul.endlessroll.entities.Entity;
|
||||
import de.frajul.endlessroll.entities.guis.ToolButtonBar;
|
||||
import de.frajul.endlessroll.entities.particles.ParticleSystem;
|
||||
import de.frajul.endlessroll.entities.shapes.PlayerShape;
|
||||
import de.frajul.endlessroll.entities.textures.TexturePack;
|
||||
import de.frajul.endlessroll.levels.worlds.World;
|
||||
import de.frajul.endlessroll.main.GameActivity;
|
||||
import de.frajul.endlessroll.user.ToolSlotSettings;
|
||||
|
||||
public class TestScreenScene extends Scene {
|
||||
|
||||
public TestScreenScene(GameActivity gameActivity, TexturePack texturePack, ParticleSystem particleSystem) {
|
||||
super(gameActivity, texturePack, particleSystem);
|
||||
// terrain.createEndless(World.GRASSLANDS, 0.6f);
|
||||
// background.changeTextures(World.ICY_MOUNTAINS.getBackgroundTexture());
|
||||
//
|
||||
// player.init(PlayerShape.BALL, 0.6f, 0.5f, 0.5f, particleSystem);
|
||||
// uncategorizedEntities.add(player);
|
||||
uncategorizedEntities.add(new Entity(World.GRASSLANDS.getBackgroundTextures().get(0), new Vector(), 1, 1));
|
||||
// terrain.createEndless(World.GRASSLANDS, 0.6f);
|
||||
// background.changeTextures(World.ICY_MOUNTAINS.getBackgroundTexture());
|
||||
//
|
||||
// player.init(PlayerShape.BALL, 0.6f, 0.5f, 0.5f, particleSystem);
|
||||
// uncategorizedEntities.add(player);
|
||||
uncategorizedEntities
|
||||
.add(new Entity(World.GRASSLANDS.getBackgroundTextures().get(0), new Vector(), 1,
|
||||
1));
|
||||
try {
|
||||
guis.addAll(new ToolButtonBar(texturePack, null,
|
||||
new ToolSlotSettings("RAMP", "STASIS", "BOMB", "MAGNET", 1)).toGuiList());
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
}
|
||||
}
|
@ -27,7 +27,6 @@ public class SettingsScreen extends Screen<LinearLayout> implements View.OnClick
|
||||
private ToggleButton musicToggle;
|
||||
private ToggleButton soundToggle;
|
||||
private CheckBox fpsCheckbox;
|
||||
private CheckBox performanceCheckbox;
|
||||
private Button creditsButton;
|
||||
private Button resetButton;
|
||||
|
||||
@ -45,8 +44,6 @@ public class SettingsScreen extends Screen<LinearLayout> implements View.OnClick
|
||||
soundToggle.setOnClickListener(this);
|
||||
fpsCheckbox = (CheckBox) layout.findViewById(R.id.settings_fps_checkbox);
|
||||
fpsCheckbox.setTypeface(gameActivity.getTypeface());
|
||||
performanceCheckbox = (CheckBox) layout.findViewById(R.id.settings_performance_checkbox);
|
||||
performanceCheckbox.setTypeface(gameActivity.getTypeface());
|
||||
creditsButton = (Button) layout.findViewById(R.id.settings_credits);
|
||||
creditsButton.setOnClickListener(this);
|
||||
resetButton = (Button) layout.findViewById(R.id.settings_reset);
|
||||
@ -72,8 +69,6 @@ public class SettingsScreen extends Screen<LinearLayout> implements View.OnClick
|
||||
musicToggle.setChecked(!gameActivity.getSoundManager().isMusicMuted());
|
||||
soundToggle.setChecked(!gameActivity.getSoundManager().isSoundsMuted());
|
||||
fpsCheckbox.setChecked(gameActivity.getDataStorageHandler().readIsShowFps());
|
||||
performanceCheckbox
|
||||
.setChecked(gameActivity.getDataStorageHandler().readIsPerformanceBoost());
|
||||
resetButton.setEnabled(super.caller != ScreenType.GAME);
|
||||
}
|
||||
|
||||
@ -84,7 +79,6 @@ public class SettingsScreen extends Screen<LinearLayout> implements View.OnClick
|
||||
gameActivity.getDataStorageHandler()
|
||||
.writeMusicMuted(gameActivity.getSoundManager().isMusicMuted());
|
||||
gameActivity.getDataStorageHandler().writeShowFps(fpsCheckbox.isChecked());
|
||||
gameActivity.getDataStorageHandler().writePerformanceBoost(performanceCheckbox.isChecked());
|
||||
flipToCaller();
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,8 @@ import javax.microedition.khronos.opengles.GL10;
|
||||
import de.frajul.endlessroll.entities.BackgroundLayer;
|
||||
import de.frajul.endlessroll.entities.Entity;
|
||||
import de.frajul.endlessroll.entities.Obstacle;
|
||||
import de.frajul.endlessroll.entities.guis.Gui;
|
||||
import de.frajul.endlessroll.entities.guis.Progressbar;
|
||||
import de.frajul.endlessroll.entities.textures.TexturePack;
|
||||
import de.frajul.endlessroll.entities.tileLists.Tile;
|
||||
import de.frajul.endlessroll.entities.tileLists.TileList;
|
||||
@ -130,23 +132,29 @@ public class GameRenderer implements GLSurfaceView.Renderer {
|
||||
}
|
||||
}
|
||||
|
||||
private void renderGuis(GL10 gl, List<Entity> guis) {
|
||||
private void renderGuis(GL10 gl, List<Gui> guis) {
|
||||
guiShader.start();
|
||||
guiShader.loadMVPMatrix(matrixCreator);
|
||||
synchronized (guis) {
|
||||
for (Entity gui : guis)
|
||||
for (Gui gui : guis)
|
||||
renderGui(gl, gui);
|
||||
}
|
||||
guiShader.stop();
|
||||
}
|
||||
|
||||
private void renderGui(GL10 gl, Entity gui) {
|
||||
private void renderGui(GL10 gl, Gui gui) {
|
||||
if (!gui.isVisible())
|
||||
return;
|
||||
|
||||
gl.glActiveTexture(GL10.GL_TEXTURE0);
|
||||
gl.glBindTexture(GL10.GL_TEXTURE_2D, gui.getTexture().getId());
|
||||
guiShader.loadTransformationMatrix(matrixCreator, gui);
|
||||
guiShader.loadCustomColor(gui.getColor());
|
||||
guiShader.loadRoundValue(gui.getRoundValue());
|
||||
if (gui instanceof Progressbar)
|
||||
guiShader.loadVisibleAmount(((Progressbar) gui).getProgress());
|
||||
else
|
||||
guiShader.loadVisibleAmount(0);
|
||||
quad.draw();
|
||||
}
|
||||
|
||||
|
@ -3,9 +3,8 @@ package de.frajul.endlessroll.rendering.shader;
|
||||
import android.content.Context;
|
||||
import android.opengl.GLES20;
|
||||
|
||||
import de.frajul.endlessroll.data.Color4f;
|
||||
import de.frajul.endlessroll.entities.Entity;
|
||||
import de.frajul.endlessroll.entities.textures.Texture;
|
||||
import de.frajul.endlessroll.main.game.Camera;
|
||||
import de.frajul.endlessroll.rendering.MatrixCreator;
|
||||
|
||||
/**
|
||||
@ -15,15 +14,23 @@ public class GuiShader extends ShaderProgram {
|
||||
|
||||
private int location_mvpMatrix;
|
||||
private int location_transformationMatrix;
|
||||
private int location_useCustomColor;
|
||||
private int location_color;
|
||||
private int location_roundValue;
|
||||
private int location_visibleAmount;
|
||||
|
||||
public GuiShader(Context context) throws Exception {
|
||||
super(context, "shader/guiVertexShader.glsl", "shader/simpleFragmentShader.glsl");
|
||||
super(context, "shader/guiVertexShader.glsl", "shader/guiFragmentShader.glsl");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void loadUniformLocations() {
|
||||
location_mvpMatrix = super.getUniformLocation("mvpMatrix");
|
||||
location_transformationMatrix = super.getUniformLocation("transformationMatrix");
|
||||
location_useCustomColor = super.getUniformLocation("useCustomColor");
|
||||
location_color = super.getUniformLocation("color");
|
||||
location_roundValue = super.getUniformLocation("roundValue");
|
||||
location_visibleAmount = super.getUniformLocation("visibleAmount");
|
||||
}
|
||||
|
||||
public void loadMVPMatrix(MatrixCreator matrixCreator) {
|
||||
@ -36,4 +43,19 @@ public class GuiShader extends ShaderProgram {
|
||||
GLES20.glUniformMatrix4fv(location_transformationMatrix, 1, false, transformationMatrix, 0);
|
||||
}
|
||||
|
||||
public void loadCustomColor(Color4f color) {
|
||||
GLES20.glUniform1f(location_useCustomColor, color == null ? 0 : 1);
|
||||
if (color != null)
|
||||
GLES20.glUniform4f(location_color, color.getR(), color.getG(), color.getB(),
|
||||
color.getA());
|
||||
}
|
||||
|
||||
public void loadRoundValue(float roundValue) {
|
||||
GLES20.glUniform1f(location_roundValue, roundValue);
|
||||
}
|
||||
|
||||
public void loadVisibleAmount(float visibleAmount) {
|
||||
GLES20.glUniform1f(location_visibleAmount, visibleAmount);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package de.frajul.endlessroll.rendering.shader;
|
||||
import android.content.Context;
|
||||
import android.opengl.GLES20;
|
||||
|
||||
import de.frajul.endlessroll.data.Color;
|
||||
import de.frajul.endlessroll.data.Color3f;
|
||||
import de.frajul.endlessroll.entities.Entity;
|
||||
import de.frajul.endlessroll.main.game.Camera;
|
||||
import de.frajul.endlessroll.rendering.MatrixCreator;
|
||||
@ -44,7 +44,7 @@ public class ParticleShader extends ShaderProgram {
|
||||
GLES20.glUniform1f(location_alpha, alpha);
|
||||
}
|
||||
|
||||
public void loadColor(Color color) {
|
||||
public void loadColor(Color3f color) {
|
||||
GLES20.glUniform3f(location_color, color.getR(), color.getG(), color.getB());
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,6 @@ package de.frajul.endlessroll.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
@ -12,7 +10,6 @@ import java.util.List;
|
||||
|
||||
import de.frajul.endlessroll.R;
|
||||
import de.frajul.endlessroll.entities.tools.ToolType;
|
||||
import de.frajul.endlessroll.main.GameLog;
|
||||
import de.frajul.endlessroll.main.game.Game;
|
||||
import de.frajul.endlessroll.main.game.GameState;
|
||||
import de.frajul.endlessroll.user.ToolSlotSettings;
|
||||
@ -20,17 +17,17 @@ import de.frajul.endlessroll.user.ToolSlotSettings;
|
||||
/**
|
||||
* Created by Julian on 16.01.2016.
|
||||
*/
|
||||
public class ToolButtonBar implements View.OnClickListener{
|
||||
public class ToolButtonBarView implements View.OnClickListener{
|
||||
|
||||
private Game game;
|
||||
private List<ToolButton> buttons = new ArrayList<>(4);
|
||||
private List<ToolButtonView> buttons = new ArrayList<>(4);
|
||||
private RelativeLayout button1;
|
||||
private RelativeLayout button2;
|
||||
private RelativeLayout button3;
|
||||
private RelativeLayout button4;
|
||||
|
||||
|
||||
public ToolButtonBar(Game game, ToolSlotSettings toolSlotSettings, LinearLayout layout1) {
|
||||
public ToolButtonBarView(Game game, ToolSlotSettings toolSlotSettings, LinearLayout layout1) {
|
||||
this.game = game;
|
||||
Context context = game.getContext();
|
||||
|
||||
@ -42,10 +39,10 @@ public class ToolButtonBar implements View.OnClickListener{
|
||||
button3.setOnClickListener(this);
|
||||
button4 = (RelativeLayout) layout1.findViewById(R.id.toolbutton_4);
|
||||
button4.setOnClickListener(this);
|
||||
buttons.add(new ToolButton(toolSlotSettings.get(0), game, context, button1));
|
||||
buttons.add(new ToolButton(toolSlotSettings.get(1), game, context, button2));
|
||||
buttons.add(new ToolButton(toolSlotSettings.get(2), game, context, button3));
|
||||
buttons.add(new ToolButton(toolSlotSettings.get(3), game, context, button4));
|
||||
buttons.add(new ToolButtonView(toolSlotSettings.get(0), game, context, button1));
|
||||
buttons.add(new ToolButtonView(toolSlotSettings.get(1), game, context, button2));
|
||||
buttons.add(new ToolButtonView(toolSlotSettings.get(2), game, context, button3));
|
||||
buttons.add(new ToolButtonView(toolSlotSettings.get(3), game, context, button4));
|
||||
}
|
||||
|
||||
public void changeToolButtonTypes(ToolSlotSettings toolSlotSettings) {
|
||||
@ -62,34 +59,34 @@ public class ToolButtonBar implements View.OnClickListener{
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (ToolButton button : buttons)
|
||||
for (ToolButtonView button : buttons)
|
||||
button.setProgress(100);
|
||||
}
|
||||
|
||||
public void update(float frameTime, boolean showAnimation) {
|
||||
for (ToolButton button : buttons)
|
||||
for (ToolButtonView button : buttons)
|
||||
button.update(frameTime, showAnimation);
|
||||
}
|
||||
|
||||
public void setActive(ToolType activeType) {
|
||||
for (ToolButton button : buttons)
|
||||
for (ToolButtonView button : buttons)
|
||||
button.setActive(button.getToolType() == activeType);
|
||||
}
|
||||
|
||||
private void setActive(int index) {
|
||||
for (ToolButton button : buttons)
|
||||
for (ToolButtonView button : buttons)
|
||||
button.setActive(buttons.indexOf(button) == index);
|
||||
}
|
||||
|
||||
public ToolButton getByToolType(ToolType type) {
|
||||
for (ToolButton button : buttons)
|
||||
public ToolButtonView getByToolType(ToolType type) {
|
||||
for (ToolButtonView button : buttons)
|
||||
if (button.getToolType() == type)
|
||||
return button;
|
||||
return null;
|
||||
}
|
||||
|
||||
public ToolButton getActiveButton() {
|
||||
for (ToolButton button : buttons)
|
||||
public ToolButtonView getActiveButton() {
|
||||
for (ToolButtonView button : buttons)
|
||||
if (button.isActive())
|
||||
return button;
|
||||
return null;
|
||||
@ -98,7 +95,7 @@ public class ToolButtonBar implements View.OnClickListener{
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (game.getGameState() == GameState.RUNNING) {
|
||||
ToolButton clickedButton = null;
|
||||
ToolButtonView clickedButton = null;
|
||||
if (v.equals(button1) && !buttons.get(0).isLocked()) {
|
||||
clickedButton = buttons.get(0);
|
||||
} else if (v.equals(button2) && !buttons.get(1).isLocked()) {
|
@ -18,7 +18,7 @@ import de.frajul.endlessroll.main.game.Game;
|
||||
/**
|
||||
* Created by Julian on 15.01.2016.
|
||||
*/
|
||||
public class ToolButton {
|
||||
public class ToolButtonView {
|
||||
|
||||
private Game game;
|
||||
private boolean locked;
|
||||
@ -33,7 +33,7 @@ public class ToolButton {
|
||||
private ImageView animationView;
|
||||
private Animation scaleAnimation;
|
||||
|
||||
public ToolButton(ToolSlot slot, Game game, Context context, RelativeLayout layout) {
|
||||
public ToolButtonView(ToolSlot slot, Game game, Context context, RelativeLayout layout) {
|
||||
this.context = context;
|
||||
this.game = game;
|
||||
this.layout = layout;
|
@ -33,11 +33,9 @@ public class ViewManager implements View.OnClickListener {
|
||||
private ImageView pauseButton;
|
||||
private GameOverMessage gameOverMessage;
|
||||
private GoalMessage goalMessage;
|
||||
public ToolButtonBar toolButtonBar;
|
||||
public ShortMenu shortMenu;
|
||||
|
||||
private boolean showFps = false;
|
||||
private boolean boostPerformance = false;
|
||||
|
||||
private List<BombErrorMessage> bombErrorMessages = new ArrayList<>();
|
||||
|
||||
@ -52,9 +50,6 @@ public class ViewManager implements View.OnClickListener {
|
||||
gameViewHandler.startInUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
toolButtonBar = new ToolButtonBar(game,
|
||||
gameActivity.getUser().getToolSlotSettings(),
|
||||
(LinearLayout) layout.findViewById(R.id.game_toolbuttonbar));
|
||||
shortMenu = new ShortMenu(game, gameScreen, gameActivity,
|
||||
layout.findViewById(R.id.game_shortmenu));
|
||||
gameOverMessage = new GameOverMessage(game, gameScreen, gameActivity,
|
||||
@ -101,12 +96,10 @@ public class ViewManager implements View.OnClickListener {
|
||||
game.tryToPause();
|
||||
}
|
||||
|
||||
public void resetViews(final User user) {
|
||||
public void resetViews() {
|
||||
gameViewHandler.startInUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
toolButtonBar.reset(user.getToolSlotSettings());
|
||||
toolButtonBar.update(0, false);
|
||||
playerProgress.setText(R.string.game_playerprogress_placeholder);
|
||||
}
|
||||
});
|
||||
@ -151,7 +144,6 @@ public class ViewManager implements View.OnClickListener {
|
||||
fpsView.setText(String.format(fpsFormat, timer.getFps()));
|
||||
if (gameRunning) {
|
||||
playerProgress.setText(String.format(playerProgressFormat, toMeters(playerX)));
|
||||
toolButtonBar.update(timer.getFrameTimeSeconds(), !boostPerformance);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -170,7 +162,4 @@ public class ViewManager implements View.OnClickListener {
|
||||
this.showFps = showFps;
|
||||
}
|
||||
|
||||
public void setBoostPerformance(boolean boostPerformance) {
|
||||
this.boostPerformance = boostPerformance;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
app/src/main/res/drawable/white.png
Normal file
After Width: | Height: | Size: 78 B |
@ -14,14 +14,14 @@
|
||||
android:layout_margin="10dp"
|
||||
android:src="@drawable/guis_pausebutton"/>
|
||||
|
||||
<include
|
||||
android:id="@+id/game_toolbuttonbar"
|
||||
layout="@layout/toolbuttonbar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="3dp"/>
|
||||
<!--<include-->
|
||||
<!--android:id="@+id/game_toolbuttonbar"-->
|
||||
<!--layout="@layout/toolbuttonbar"-->
|
||||
<!--android:layout_width="wrap_content"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:layout_alignParentTop="true"-->
|
||||
<!--android:layout_centerHorizontal="true"-->
|
||||
<!--android:layout_marginTop="3dp"/>-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_playerprogress"
|
||||
|
@ -110,13 +110,6 @@
|
||||
android:text="@string/settings_show_fps"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/settings_performance_checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settings_boost_performance"
|
||||
android:textSize="20sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
|
@ -76,7 +76,6 @@
|
||||
<string name="credits_music_title">MUSIK</string>
|
||||
<string name="settings_music">Musik</string>
|
||||
<string name="settings_show_fps">Fps anzeigen</string>
|
||||
<string name="settings_boost_performance">Leistung erhöhen</string>
|
||||
<string name="playershape_name_blue">Ich bin blau</string>
|
||||
<string name="playershape_description_blue">Warum bin ich blau?</string>
|
||||
</resources>
|
@ -5,7 +5,6 @@
|
||||
<string name="placeholder_number" translatable="false">997.5</string>
|
||||
|
||||
<string name="settings_show_fps">Show Fps</string>
|
||||
<string name="settings_boost_performance">Boost performance</string>
|
||||
<string name="game_bomb_error_message">Set the bomb on an obstacle</string>
|
||||
<string name="game_playerprogress_placeholder" translatable="false">0.0m</string>
|
||||
<string name="game_playerprogress_format_f" translatable="false">%.1fm</string>
|
||||
|