Skip to content

Commit

Permalink
package review
Browse files Browse the repository at this point in the history
  • Loading branch information
capdevon committed Mar 7, 2024
1 parent 4e46035 commit 52ac926
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 381 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/capdevon/demo/Test_AnimControllerLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import com.capdevon.anim.fsm.AnimatorController;
import com.capdevon.anim.fsm.AnimatorControllerLayer;
import com.capdevon.anim.fsm.AnimatorControllerParameter.AnimatorControllerParameterType;
import com.capdevon.demo.states.DefaultSceneAppState;
import com.capdevon.demo.states.SimpleAppState;
import com.capdevon.demo.states.TogglePhysicsDebugState;
import com.capdevon.demo.util.FRotator;
import com.capdevon.anim.fsm.AnimatorState;
import com.capdevon.anim.fsm.AnimatorStateMachine;
import com.capdevon.anim.fsm.AnimatorStateTransition;
import com.capdevon.demo.util.DefaultSceneAppState;
import com.capdevon.engine.FRotator;
import com.capdevon.engine.SimpleAppState;
import com.capdevon.physx.TogglePhysicsDebugState;
import com.jme3.anim.AnimComposer;
import com.jme3.anim.AnimationMask;
import com.jme3.anim.SkinningControl;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/capdevon/demo/Test_AnimStateController.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import com.capdevon.anim.fsm.AnimatorController;
import com.capdevon.anim.fsm.AnimatorControllerLayer;
import com.capdevon.anim.fsm.AnimatorControllerParameter.AnimatorControllerParameterType;
import com.capdevon.demo.states.DefaultSceneAppState;
import com.capdevon.demo.states.SimpleAppState;
import com.capdevon.demo.states.TogglePhysicsDebugState;
import com.capdevon.anim.fsm.AnimatorState;
import com.capdevon.anim.fsm.AnimatorStateMachine;
import com.capdevon.anim.fsm.AnimatorStateTransition;
import com.capdevon.demo.util.DefaultSceneAppState;
import com.capdevon.engine.SimpleAppState;
import com.capdevon.physx.TogglePhysicsDebugState;
import com.jme3.anim.AnimComposer;
import com.jme3.app.Application;
import com.jme3.app.FlyCamAppState;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/capdevon/demo/Test_BlendTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import com.capdevon.anim.fsm.AnimatorConditionMode;
import com.capdevon.anim.fsm.AnimatorController;
import com.capdevon.anim.fsm.AnimatorControllerParameter.AnimatorControllerParameterType;
import com.capdevon.demo.states.DefaultSceneAppState;
import com.capdevon.demo.states.TogglePhysicsDebugState;
import com.capdevon.anim.fsm.AnimatorState;
import com.capdevon.anim.fsm.AnimatorStateMachine;
import com.capdevon.anim.fsm.AnimatorStateTransition;
import com.capdevon.anim.fsm.BlendTree;
import com.capdevon.demo.util.DefaultSceneAppState;
import com.capdevon.physx.TogglePhysicsDebugState;
import com.jme3.anim.SkinningControl;
import com.jme3.app.Application;
import com.jme3.app.FlyCamAppState;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/capdevon/demo/Test_BlendTree2D.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import com.capdevon.anim.fsm.AnimatorStateMachine;
import com.capdevon.anim.fsm.BlendTree;
import com.capdevon.anim.fsm.BlendTree.BlendTreeType;
import com.capdevon.demo.util.DefaultSceneAppState;
import com.capdevon.engine.FRotator;
import com.capdevon.physx.TogglePhysicsDebugState;
import com.capdevon.demo.states.DefaultSceneAppState;
import com.capdevon.demo.states.TogglePhysicsDebugState;
import com.capdevon.demo.util.FRotator;
import com.jme3.anim.AnimComposer;
import com.jme3.anim.SkinningControl;
import com.jme3.app.Application;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import com.capdevon.anim.fsm.StateMachineBehaviour;
import com.capdevon.anim.fsm.StateMachineListener;
import com.capdevon.demo.control.PlayerBaseControl;
import com.capdevon.demo.util.DefaultSceneAppState;
import com.capdevon.demo.states.DefaultSceneAppState;
import com.capdevon.demo.states.TogglePhysicsDebugState;
import com.capdevon.demo.util.MeshBuilder;
import com.capdevon.physx.TogglePhysicsDebugState;
import com.jme3.anim.AnimComposer;
import com.jme3.app.FlyCamAppState;
import com.jme3.app.SimpleApplication;
Expand Down
20 changes: 8 additions & 12 deletions src/main/java/com/capdevon/demo/control/AdapterControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Objects;

import com.capdevon.engine.GameObject;
import com.capdevon.demo.util.GameObject;
import com.jme3.renderer.RenderManager;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.Node;
Expand All @@ -17,10 +17,9 @@
public abstract class AdapterControl extends AbstractControl {

/**
* Returns the first child found with exactly the given name
* (case-sensitive).
* Returns the first child found with exactly the given name (case-sensitive).
*
* @param name - the name of the child to retrieve
* @param name The name of the child to retrieve
* @return
*/
public Spatial getChild(String name) {
Expand All @@ -42,37 +41,34 @@ public <T> T getUserData(String key, boolean failOnMiss) {
}

/**
* Returns the component of Type type if the game object has one attached,
* null if it doesn't.
* Returns the component of Type type if the game object has one attached, null
* if it doesn't.
*/
public <T extends Control> T getComponent(Class<T> type) {
return spatial.getControl(type);
}

/**
* Returns the component of Type type in the GameObject or any of its
* children using depth first search.
* Returns the component of Type type in the GameObject or any of its children
* using depth first search.
*/
public <T extends Control> T getComponentInChildren(Class<T> type) {
return GameObject.getComponentInChildren(spatial, type);
}

/**
* Retrieves the component of Type type in the GameObject or any of its
* parents.
* Retrieves the component of Type type in the GameObject or any of its parents.
*/
public <T extends Control> T getComponentInParent(Class<T> type) {
return GameObject.getComponentInParent(spatial, type);
}

@Override
protected void controlUpdate(float tpf) {
//To change body of generated methods, choose Tools | Templates.
}

@Override
protected void controlRender(RenderManager rm, ViewPort vp) {
//To change body of generated methods, choose Tools | Templates.
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.capdevon.demo.control;

import com.capdevon.engine.FRotator;
import com.capdevon.demo.util.FRotator;
import com.jme3.app.Application;
import com.jme3.bullet.control.BetterCharacterControl;
import com.jme3.input.InputManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.capdevon.demo.util;
package com.capdevon.demo.states;

import com.capdevon.engine.SimpleAppState;
import com.jme3.app.Application;
import com.jme3.bullet.collision.shapes.CollisionShape;
import com.jme3.bullet.control.RigidBodyControl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.capdevon.engine;
package com.capdevon.demo.states;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.capdevon.physx;
package com.capdevon.demo.states;

import com.jme3.app.Application;
import com.jme3.app.state.BaseAppState;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.capdevon.engine;
package com.capdevon.demo.util;

import com.jme3.math.FastMath;
import com.jme3.math.Quaternion;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.capdevon.engine;
package com.capdevon.demo.util;

import com.jme3.scene.Node;
import com.jme3.scene.Spatial;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.capdevon.engine;
package com.capdevon.demo.util;

import com.jme3.math.Ray;
import com.jme3.math.Transform;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.capdevon.engine;
package com.capdevon.demo.util;

import com.jme3.math.FastMath;

Expand Down
Loading

0 comments on commit 52ac926

Please sign in to comment.