diff --git a/Assets/Scenes/PlayerControllerTest.shade b/Assets/Scenes/PlayerControllerTest.shade new file mode 100644 index 00000000..c513bbc3 --- /dev/null +++ b/Assets/Scenes/PlayerControllerTest.shade @@ -0,0 +1,262 @@ +- EID: 0 + Name: Default + IsActive: true + NumberOfChildren: 0 + Components: + Camera Component: + Position: {x: 0, y: 0, z: 0} + Pitch: 0 + Yaw: 0 + Roll: 0 + Width: 1920 + Height: 1080 + Near: 0.00999999978 + Far: 10000 + Perspective: true + Light Component: + Position: {x: 0, y: 0, z: 0} + Type: Directional + Direction: {x: 1.79999995, y: 0, z: 1} + Color: {x: 0.951541841, y: 0.921719015, z: 0.553319454, w: 1} + Layer: 4294967295 + Strength: 0 + Scripts: ~ +- EID: 1 + Name: Default + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -1.440328, y: -4.41369677, z: -5} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 49.4798889, y: 0.5, z: 17.5} + Renderable Component: + Mesh: 149697411 + Material: 126974645 + RigidBody Component: + Type: Static + Mass: 1 + Drag: 0.00999999978 + Angular Drag: 0.00999999978 + Use Gravity: true + Interpolate: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: false + Freeze Rotation Y: false + Freeze Rotation Z: false + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 1, y: 1, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0, z: 0} + Scripts: ~ +- EID: 2 + Name: Player + IsActive: true + NumberOfChildren: 3 + Components: + Transform Component: + Translate: {x: -3.06177855, y: -3.67369723, z: -5} + Rotate: {x: -0, y: 0, z: 0} + Scale: {x: 2, y: 2, z: 2} + Renderable Component: + Mesh: 149697411 + Material: 126974645 + RigidBody Component: + Type: Dynamic + Mass: 1 + Drag: 2 + Angular Drag: 0 + Use Gravity: false + Interpolate: false + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: true + Freeze Rotation Y: true + Freeze Rotation Z: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 1, y: 1, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Scripts: + - Type: PlayerController + currentState: 1 + maxMoveVel: 2 + moveForce: 50 + sprintMultiplier: 2 + rotationFactorPerFrame: 1 + maxJumpHeight: 4 + maxJumpTime: 0.75 + fallMultipler: 2 + lightMultiper: 0.75 + mediumMultiper: 0.5 + heavyMultiper: 0.25 + - Type: PickAndThrow + holdPosition: [0, 1, 0] + throwForce: [100, 200, 100] +- EID: 3 + Name: Default + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 1, z: 0} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + Scripts: ~ +- EID: 4 + Name: Default + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0} + Rotate: {x: -0.109950222, y: 6.26573324, z: 0} + Scale: {x: 1, y: 1, z: 1} + Camera Component: + Position: {x: -3.06177855, y: -3.67369723, z: -5} + Pitch: -6.29968357 + Yaw: 359.000061 + Roll: 0 + Width: 1920 + Height: 1080 + Near: 0.00999999978 + Far: 10000 + Perspective: true + Scripts: + - Type: SHADE_Scripting.ThirdPersonCamera + armLength: 2 + turnSpeedPitch: 0.300000012 + turnSpeedYaw: 0.5 + pitchClamp: 45 +- EID: 9 + Name: Default + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: 0} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + Renderable Component: + Mesh: 144838771 + Material: 123745521 + Scripts: ~ +- EID: 6 + Name: AI + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: -8, y: -4.42369843, z: 2.5} + Rotate: {x: -0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + Renderable Component: + Mesh: 149697411 + Material: 126974645 + RigidBody Component: + Type: Dynamic + Mass: 1 + Drag: 0 + Angular Drag: 0 + Use Gravity: true + Interpolate: false + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: true + Freeze Rotation Y: true + Freeze Rotation Z: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 0.5, y: 0.5, z: 0.5} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Scripts: ~ +- EID: 7 + Name: Default + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: -16.8647861, z: -14.039052} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 28.1434975, y: 28.1434975, z: 28.1434975} + Renderable Component: + Mesh: 149697411 + Material: 126974645 + Scripts: ~ +- EID: 8 + Name: Default + IsActive: true + NumberOfChildren: 0 + Components: + Light Component: + Position: {x: 0, y: 0, z: 0} + Type: Ambient + Direction: {x: 0, y: 0, z: 1} + Color: {x: 1, y: 1, z: 1, w: 1} + Layer: 4294967295 + Strength: 0.25 + Scripts: ~ +- EID: 5 + Name: item + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 3.19870043, y: -3.67369723, z: -5} + Rotate: {x: -0, y: 0, z: 0} + Scale: {x: 2, y: 2, z: 2} + Renderable Component: + Mesh: 144838771 + Material: 123745521 + RigidBody Component: + Type: Dynamic + Mass: 1 + Drag: 0 + Angular Drag: 0 + Use Gravity: true + Interpolate: false + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: true + Freeze Rotation Y: true + Freeze Rotation Z: true + Collider Component: + Colliders: + - Is Trigger: false + Type: Box + Half Extents: {x: 1, y: 1, z: 1} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + - Is Trigger: true + Type: Box + Half Extents: {x: 2, y: 2, z: 2} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.5, z: 0} + Scripts: + - Type: Item + Score: 1 + currCategory: 0 \ No newline at end of file diff --git a/Assets/Scenes/PlayerControllerTest.shade.shmeta b/Assets/Scenes/PlayerControllerTest.shade.shmeta new file mode 100644 index 00000000..3d9787c8 --- /dev/null +++ b/Assets/Scenes/PlayerControllerTest.shade.shmeta @@ -0,0 +1,3 @@ +Name: PlayerControllerTest +ID: 92100024 +Type: 5 diff --git a/Assets/Scripts/SC_Item.cs.shmeta b/Assets/Scripts/SC_Item.cs.shmeta new file mode 100644 index 00000000..2503da21 --- /dev/null +++ b/Assets/Scripts/SC_Item.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_Item +ID: 153136539 +Type: 9 diff --git a/Assets/Scripts/SC_PickAndThrow.cs.shmeta b/Assets/Scripts/SC_PickAndThrow.cs.shmeta new file mode 100644 index 00000000..5703d6d7 --- /dev/null +++ b/Assets/Scripts/SC_PickAndThrow.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_PickAndThrow +ID: 154802724 +Type: 9 diff --git a/Assets/Scripts/SC_PlayerController.cs b/Assets/Scripts/SC_PlayerController.cs index 84f7584d..054507e8 100644 --- a/Assets/Scripts/SC_PlayerController.cs +++ b/Assets/Scripts/SC_PlayerController.cs @@ -80,10 +80,6 @@ public class PlayerController : Script public float mediumMultiper = 0.5f; public float heavyMultiper = 0.25f; - public PlayerController(GameObject gameObj) : base(gameObj) - { - } - protected override void awake() { //default setup @@ -133,7 +129,7 @@ public class PlayerController : Script cam = GetComponentInChildren(); GotCaught(); - //Debug.Log($"X: {axisMove.x}" + $" Y: {axisMove.y}"); + //Debug.Log($"X: {rb.LinearVelocity.x}" + $" Y: {rb.LinearVelocity.z}"); //Debug.Log(currentState.ToString() + " x:" + rb.LinearVelocity.x.ToString() + " y:" + rb.LinearVelocity.y.ToString() + " z:" + rb.LinearVelocity.z.ToString()); } @@ -229,8 +225,8 @@ public class PlayerController : Script { if (rb != null) { - rb.AddForce(new Vector3(axisMove.x, 0.0f,axisMove.y) * moveForce); + Debug.Log($"axis:{axisMove.x} moveforce: {moveForce} X: {rb.LinearVelocity.x}" + $" Z: {rb.LinearVelocity.z}"); if (isMoveKeyPress) { diff --git a/Assets/Scripts/SC_PlayerController.cs.shmeta b/Assets/Scripts/SC_PlayerController.cs.shmeta new file mode 100644 index 00000000..445af934 --- /dev/null +++ b/Assets/Scripts/SC_PlayerController.cs.shmeta @@ -0,0 +1,3 @@ +Name: SC_PlayerController +ID: 160432754 +Type: 9 diff --git a/Assets/Scripts/UT_BaseSate.cs.shmeta b/Assets/Scripts/UT_BaseSate.cs.shmeta new file mode 100644 index 00000000..49e62af3 --- /dev/null +++ b/Assets/Scripts/UT_BaseSate.cs.shmeta @@ -0,0 +1,3 @@ +Name: UT_BaseSate +ID: 154709755 +Type: 9 diff --git a/Assets/Scripts/UT_StateMachine.cs b/Assets/Scripts/UT_StateMachine.cs index b0881cee..9e66bc6c 100644 --- a/Assets/Scripts/UT_StateMachine.cs +++ b/Assets/Scripts/UT_StateMachine.cs @@ -10,8 +10,6 @@ public class StateMachine : Script public string currentStateName; public string currentAnimName; - public StateMachine(GameObject gameObj) : base(gameObj) { } - public void InitStateMachine(Dictionary dictionary) { diff --git a/Assets/Scripts/UT_StateMachine.cs.shmeta b/Assets/Scripts/UT_StateMachine.cs.shmeta new file mode 100644 index 00000000..3e0b1dee --- /dev/null +++ b/Assets/Scripts/UT_StateMachine.cs.shmeta @@ -0,0 +1,3 @@ +Name: UT_StateMachine +ID: 166010611 +Type: 9