Revision | 59154b14fbd7387efd8e7fa6abcac8b8506e7adb (tree) |
---|---|
Time | 2020-02-13 07:31:17 |
Author | sebastian_bugiu <sebastian_ <bugiu@head...> |
Commiter | sebastian_bugiu <sebastian_ |
Added some documentation.
@@ -2077,6 +2077,7 @@ | ||
2077 | 2077 | } |
2078 | 2078 | |
2079 | 2079 | // It happens that we only support power of two textures |
2080 | + @Deprecated | |
2080 | 2081 | public static int getWidthAndHeight(int width, int height) { |
2081 | 2082 | if (width > height) { |
2082 | 2083 | return GLPixelUtil.optionalPO2(width); |
@@ -2092,10 +2093,19 @@ | ||
2092 | 2093 | return getRandom().nextFloat(s) * (max - min) + min; |
2093 | 2094 | } |
2094 | 2095 | |
2096 | + /** | |
2097 | + * | |
2098 | + * @return the random number between -1.0f and 1.0f. | |
2099 | + */ | |
2095 | 2100 | public static float symmetricRandom() { |
2096 | 2101 | return symmetricRandom(null); |
2097 | 2102 | } |
2098 | 2103 | |
2104 | + /** | |
2105 | + * | |
2106 | + * @param s | |
2107 | + * @return the random number between -1.0f and 1.0f. | |
2108 | + */ | |
2099 | 2109 | public static float symmetricRandom(String s) { |
2100 | 2110 | return 2.0f * getRandom().nextFloat(s) - 1.0f; |
2101 | 2111 | } |
@@ -1,26 +1,32 @@ | ||
1 | 1 | package headwayent.blackholedarksun.components; |
2 | 2 | |
3 | -import headwayent.blackholedarksun.animations.AnimationFactory; | |
4 | -import headwayent.blackholedarksun.physics.EntityMotionState; | |
5 | -import headwayent.blackholedarksun.physics.EntityRigidBody; | |
6 | -import headwayent.hotshotengine.*; | |
7 | -import headwayent.hotshotengine.audio.ENG_Playable; | |
8 | -import headwayent.hotshotengine.renderer.ENG_Entity; | |
9 | -import headwayent.hotshotengine.renderer.ENG_Item; | |
10 | -import headwayent.hotshotengine.renderer.ENG_Node.TransformSpace; | |
11 | -import headwayent.hotshotengine.renderer.ENG_SceneNode; | |
12 | - | |
13 | -import java.util.HashMap; | |
14 | -import java.util.LinkedList; | |
15 | -import java.util.Map; | |
16 | -import java.util.concurrent.locks.ReentrantLock; | |
17 | - | |
18 | 3 | import com.artemis.Entity; |
19 | 4 | import com.badlogic.gdx.math.Vector3; |
20 | 5 | import com.badlogic.gdx.physics.bullet.collision.btCollisionShape; |
21 | 6 | import com.badlogic.gdx.physics.bullet.dynamics.btRigidBody; |
22 | 7 | |
23 | -import headwayent.blackholedarksun.*; | |
8 | +import java.util.HashMap; | |
9 | +import java.util.Map; | |
10 | +import java.util.concurrent.locks.ReentrantLock; | |
11 | + | |
12 | +import headwayent.blackholedarksun.Animation; | |
13 | +import headwayent.blackholedarksun.GameWorld; | |
14 | +import headwayent.blackholedarksun.MainActivity; | |
15 | +import headwayent.blackholedarksun.Utility; | |
16 | +import headwayent.blackholedarksun.animations.AnimationFactory; | |
17 | +import headwayent.blackholedarksun.physics.EntityMotionState; | |
18 | +import headwayent.blackholedarksun.physics.EntityRigidBody; | |
19 | +import headwayent.hotshotengine.ENG_AxisAlignedBox; | |
20 | +import headwayent.hotshotengine.ENG_Math; | |
21 | +import headwayent.hotshotengine.ENG_Quaternion; | |
22 | +import headwayent.hotshotengine.ENG_Utility; | |
23 | +import headwayent.hotshotengine.ENG_Vector3D; | |
24 | +import headwayent.hotshotengine.ENG_Vector4D; | |
25 | +import headwayent.hotshotengine.audio.ENG_Playable; | |
26 | +import headwayent.hotshotengine.renderer.ENG_Entity; | |
27 | +import headwayent.hotshotengine.renderer.ENG_Item; | |
28 | +import headwayent.hotshotengine.renderer.ENG_Node.TransformSpace; | |
29 | +import headwayent.hotshotengine.renderer.ENG_SceneNode; | |
24 | 30 | |
25 | 31 | public class EntityProperties extends MultiplayerComponent implements ENG_Playable { |
26 | 32 |
@@ -21,7 +21,7 @@ | ||
21 | 21 | FrameInterval frameInterval = context.deserialize(frameIntervalElem, FrameInterval.class); |
22 | 22 | frameIntervals.add(frameInterval); |
23 | 23 | } |
24 | - // Never fucking call it on the JsoneElement sent as a param. It will result in an INFINITE LOOP!!! | |
24 | + // Never fucking call it on the JsonElement sent as a param. It will result in an INFINITE LOOP!!! | |
25 | 25 | // Frame frame = context.deserialize(jsonObject, Frame.class); |
26 | 26 | // frame._clearFrameIntervalList(); |
27 | 27 | Frame frame = (Frame) MainApp.getMainThread().getFrameFactory().createFrame(MainApp.getMainThread().getDebuggingState()); |