Explorar o código

adding prefabs for level

Justin Gilman hai 1 ano
pai
achega
6530554163

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
Assets/Main.rogueScene


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
Assets/Prefabs/BarrelMovable.roguePrefab


+ 1 - 0
Assets/Prefabs/BarrelMovable.roguePrefab.meta

@@ -0,0 +1 @@
+{"uuid":"8e7791f5-2b9f-4d8a-a02c-f94ff458bebf","type":"Prefab"}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
Assets/Prefabs/FloorRockyTile.roguePrefab


+ 1 - 0
Assets/Prefabs/FloorRockyTile.roguePrefab.meta

@@ -0,0 +1 @@
+{"uuid":"cf1adc77-3f12-4a23-a4ea-b266281559d1","type":"Prefab"}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
Assets/Prefabs/FloorTile.roguePrefab


+ 1 - 0
Assets/Prefabs/FloorTile.roguePrefab.meta

@@ -0,0 +1 @@
+{"uuid":"8c9bd039-ce58-4d18-87df-1de5384a28e1","type":"Prefab"}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
Assets/Prefabs/TreasureChest.roguePrefab


+ 1 - 0
Assets/Prefabs/TreasureChest.roguePrefab.meta

@@ -0,0 +1 @@
+{"uuid":"8f4995ed-48b2-45bb-b323-be29ca2e4971","type":"Prefab"}

+ 14 - 11
Assets/rogue_packages/EyeOfMidas/rapier-movement-controller/RapierMovementController.re.ts

@@ -84,7 +84,7 @@ export default class RapierMovementController extends RE.Component {
     //   }
     // }
 
-    this.scaledVelocity.set(0,0,0)
+    
     if(this.thrust) {
       this.moveForward(1 * this.speed)
     }
@@ -160,12 +160,13 @@ export default class RapierMovementController extends RE.Component {
       let newRotation = new THREE.Quaternion()
       newRotation.setFromEuler(euler)
       const nextRotation = this.convertRapierToThreeQuat(this.bodyComponent.body.rotation())
-      nextRotation.slerp(newRotation, 1)
+      nextRotation.slerp(newRotation, this.rotationSpeed * RE.Runtime.deltaTime)
       this.bodyComponent.body.setNextKinematicRotation(nextRotation)
     } else {
       forwardVector = this.objectVectorCalculator.getForward()
     }
     
+    this.scaledVelocity.set(0,0,0)
     this.scaledVelocity.addScaledVector(forwardVector, distance)
 
     this.velocity.x += this.scaledVelocity.x
@@ -178,19 +179,21 @@ export default class RapierMovementController extends RE.Component {
     if(this.useCameraForward) {
       rightVector = this.cameraVectorCalculator.getRight()
 
-      // let euler = new THREE.Euler(0,0,0, 'XZY')
-      // euler.setFromQuaternion(RE.Runtime.camera.quaternion.normalize())
-      // euler.x = 0
-      // euler.z = 0
-      // let newRotation = new THREE.Quaternion()
-      // newRotation.setFromEuler(euler)
-      // const nextRotation = this.convertRapierToThreeQuat(this.bodyComponent.body.rotation())
-      // nextRotation.slerp(newRotation, RE.Runtime.deltaTime)
-      // this.bodyComponent.body.setNextKinematicRotation(nextRotation)
+      let euler = new THREE.Euler(0,0,0, 'XZY')
+      euler.setFromQuaternion(RE.Runtime.camera.quaternion.normalize())
+      euler.x = 0
+      euler.z = 0
+      let newRotation = new THREE.Quaternion()
+      newRotation.setFromEuler(euler)
+      const nextRotation = this.convertRapierToThreeQuat(this.bodyComponent.body.rotation())
+      nextRotation.slerp(newRotation, this.rotationSpeed * RE.Runtime.deltaTime)
+      this.bodyComponent.body.setNextKinematicRotation(nextRotation)
 
     } else {
       rightVector = this.objectVectorCalculator.getRight()
     }
+
+    this.scaledVelocity.set(0,0,0)
       this.scaledVelocity.addScaledVector(rightVector, distance)
       // this.rapierScaledVelocity.x = this.scaledVelocity.x
       // this.rapierScaledVelocity.y = this.scaledVelocity.y

+ 12 - 2
dist/rogue-engine-user-scripts.js

@@ -378,7 +378,6 @@ class RapierMovementController extends rogue_engine__WEBPACK_IMPORTED_MODULE_1__
       return;
     }
     this.elapsed += rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.deltaTime;
-    this.scaledVelocity.set(0, 0, 0);
     if (this.thrust) {
       this.moveForward(1 * this.speed);
     }
@@ -433,11 +432,12 @@ class RapierMovementController extends rogue_engine__WEBPACK_IMPORTED_MODULE_1__
       let newRotation = new three__WEBPACK_IMPORTED_MODULE_2__.Quaternion();
       newRotation.setFromEuler(euler);
       const nextRotation = this.convertRapierToThreeQuat(this.bodyComponent.body.rotation());
-      nextRotation.slerp(newRotation, 1);
+      nextRotation.slerp(newRotation, this.rotationSpeed * rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.deltaTime);
       this.bodyComponent.body.setNextKinematicRotation(nextRotation);
     } else {
       forwardVector = this.objectVectorCalculator.getForward();
     }
+    this.scaledVelocity.set(0, 0, 0);
     this.scaledVelocity.addScaledVector(forwardVector, distance);
     this.velocity.x += this.scaledVelocity.x;
     this.velocity.y += this.scaledVelocity.y;
@@ -447,9 +447,19 @@ class RapierMovementController extends rogue_engine__WEBPACK_IMPORTED_MODULE_1__
     let rightVector;
     if (this.useCameraForward) {
       rightVector = this.cameraVectorCalculator.getRight();
+      let euler = new three__WEBPACK_IMPORTED_MODULE_2__.Euler(0, 0, 0, "XZY");
+      euler.setFromQuaternion(rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.camera.quaternion.normalize());
+      euler.x = 0;
+      euler.z = 0;
+      let newRotation = new three__WEBPACK_IMPORTED_MODULE_2__.Quaternion();
+      newRotation.setFromEuler(euler);
+      const nextRotation = this.convertRapierToThreeQuat(this.bodyComponent.body.rotation());
+      nextRotation.slerp(newRotation, this.rotationSpeed * rogue_engine__WEBPACK_IMPORTED_MODULE_1__.Runtime.deltaTime);
+      this.bodyComponent.body.setNextKinematicRotation(nextRotation);
     } else {
       rightVector = this.objectVectorCalculator.getRight();
     }
+    this.scaledVelocity.set(0, 0, 0);
     this.scaledVelocity.addScaledVector(rightVector, distance);
     this.velocity.x += this.scaledVelocity.x;
     this.velocity.y += this.scaledVelocity.y;

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/rogue-engine-user-scripts.js.map


+ 1 - 1
rogue-config.json

@@ -1 +1 @@
-{"title":"Project","scenes":[], "projectVersion": 22}
+{"title":"Project","scenes":[],"projectVersion":22,"lastOpenedScene":"\\Assets\\Main.rogueScene"}

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio