-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from DomenicDev/v.012
V0.12
- Loading branch information
Showing
55 changed files
with
889 additions
and
83 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> | ||
<properties> | ||
|
||
<entry key="testText">Das ist ein Beispieltext. Hier kommt noch mehr und noch mehr Text hin | ||
Und hier kann man | ||
viel mit machen weils cool ist. | ||
</entry> | ||
|
||
|
||
</properties> |
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,4 @@ | ||
Material My Material : Common/MatDefs/Light/Lighting.j3md { | ||
MaterialParameters { | ||
} | ||
} |
Binary file not shown.
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,3 @@ | ||
# | ||
#Fri Jun 09 13:51:19 CEST 2017 | ||
ORIGINAL_PATH=Models/Flashlight/TestFlashLight.j3o |
Binary file not shown.
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,3 @@ | ||
# | ||
#Mon Jun 12 11:49:29 CEST 2017 | ||
ORIGINAL_PATH=Models/Headlamp/blender2ogre-export.scene |
Binary file not shown.
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,3 @@ | ||
# | ||
#Thu Jun 08 01:17:28 CEST 2017 | ||
ORIGINAL_PATH=Models/Paper/TestPaper.j3o |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
32 changes: 32 additions & 0 deletions
32
src/de/gamedevbaden/crucified/appstates/GameCommanderHolder.java
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,32 @@ | ||
package de.gamedevbaden.crucified.appstates; | ||
|
||
import com.jme3.app.state.AbstractAppState; | ||
import com.simsilica.es.EntityId; | ||
import de.gamedevbaden.crucified.game.GameCommander; | ||
|
||
import java.util.HashMap; | ||
|
||
/** | ||
* This state holds a map of {@link GameCommander}s with their playerId as key. This | ||
* state is used for easier access. | ||
* Created by Domenic on 08.06.2017. | ||
*/ | ||
public class GameCommanderHolder extends AbstractAppState { | ||
|
||
private HashMap<EntityId, GameCommander> map = new HashMap<>(); | ||
|
||
public void add(EntityId player, GameCommander commander) { | ||
map.put(player, commander); | ||
} | ||
|
||
public GameCommander get(EntityId player) { | ||
return map.get(player); | ||
} | ||
|
||
@Override | ||
public void cleanup() { | ||
this.map.clear(); | ||
this.map = null; | ||
super.cleanup(); | ||
} | ||
} |
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
50 changes: 50 additions & 0 deletions
50
src/de/gamedevbaden/crucified/appstates/ItemFunctionalityAppState.java
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,50 @@ | ||
package de.gamedevbaden.crucified.appstates; | ||
|
||
import com.jme3.app.Application; | ||
import com.jme3.app.state.AbstractAppState; | ||
import com.jme3.app.state.AppStateManager; | ||
import com.simsilica.es.EntityData; | ||
import com.simsilica.es.EntityId; | ||
import com.simsilica.es.EntitySet; | ||
import de.gamedevbaden.crucified.es.components.FlashLight; | ||
|
||
/** | ||
* This state handles the functionality of items the player can interact with. | ||
* For example: Turning a FlashLight on or off | ||
* <p> | ||
* Created by Domenic on 09.06.2017. | ||
*/ | ||
public class ItemFunctionalityAppState extends AbstractAppState { | ||
|
||
private EntityData entityData; | ||
private EntitySet flashLights; | ||
|
||
@Override | ||
public void initialize(AppStateManager stateManager, Application app) { | ||
this.entityData = stateManager.getState(EntityDataState.class).getEntityData(); | ||
this.flashLights = entityData.getEntities(FlashLight.class); | ||
super.initialize(stateManager, app); | ||
} | ||
|
||
@Override | ||
public void update(float tpf) { | ||
flashLights.applyChanges(); | ||
} | ||
|
||
public void toggleFlashLight(EntityId flashLight) { | ||
if (flashLights.containsId(flashLight)) { | ||
FlashLight lightComponent = flashLights.getEntity(flashLight).get(FlashLight.class); | ||
boolean enabled = lightComponent.isEnabled(); | ||
enabled = !enabled; // we switch on / off state | ||
entityData.setComponent(flashLight, new FlashLight(enabled)); | ||
} | ||
} | ||
|
||
@Override | ||
public void cleanup() { | ||
this.flashLights.release(); | ||
this.flashLights.clear(); | ||
this.flashLights = null; | ||
super.cleanup(); | ||
} | ||
} |
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
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
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.