@directivegames/genesys.sdk 4.1.0 → 4.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/asset-pack/eslint.config.js +6 -3
- package/dist/src/dependencies.js +1 -1
- package/dist/src/templates/eslint.config.js +6 -3
- package/dist/src/templates/src/templates/firstPerson/src/game.js +1 -1
- package/dist/src/templates/src/templates/fps/src/game.js +1 -1
- package/dist/src/templates/src/templates/fps/src/player.js +1 -1
- package/dist/src/templates/src/templates/fps/src/weapon.js +1 -1
- package/dist/src/templates/src/templates/freeCamera/src/game.js +1 -1
- package/dist/src/templates/src/templates/sideScroller/src/game.js +1 -1
- package/dist/src/templates/src/templates/sideScroller/src/level-generator.js +3 -3
- package/dist/src/templates/src/templates/sideScroller/src/player.js +2 -2
- package/dist/src/templates/src/templates/thirdPerson/src/game.js +1 -1
- package/dist/src/templates/src/templates/vehicle/src/game.js +1 -1
- package/dist/src/templates/src/templates/vehicle/src/player.js +2 -2
- package/dist/src/templates/src/templates/vehicle/src/ui-hints.js +2 -2
- package/dist/src/templates/src/templates/vr-game/src/game.js +1 -1
- package/package.json +3 -3
- package/src/asset-pack/eslint.config.js +6 -4
- package/src/templates/eslint.config.js +6 -3
- package/src/templates/src/templates/firstPerson/src/game.ts +1 -1
- package/src/templates/src/templates/fps/src/game.ts +1 -1
- package/src/templates/src/templates/fps/src/player.ts +1 -1
- package/src/templates/src/templates/fps/src/weapon.ts +1 -1
- package/src/templates/src/templates/freeCamera/src/game.ts +1 -1
- package/src/templates/src/templates/sideScroller/src/game.ts +1 -1
- package/src/templates/src/templates/sideScroller/src/level-generator.ts +3 -3
- package/src/templates/src/templates/sideScroller/src/player.ts +2 -2
- package/src/templates/src/templates/thirdPerson/src/game.ts +1 -1
- package/src/templates/src/templates/vehicle/src/game.ts +1 -1
- package/src/templates/src/templates/vehicle/src/player.ts +2 -2
- package/src/templates/src/templates/vehicle/src/ui-hints.ts +2 -2
- package/src/templates/src/templates/vr-game/src/game.ts +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import tsParser from '@typescript-eslint/parser';
|
|
2
2
|
import noDefaultClassFields from './node_modules/@directivegames/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
3
|
import defaultGetterReturnType from './node_modules/@directivegames/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
-
import constructorTypeConsistency from './node_modules/@directivegames/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
4
|
import noOverrideMethods from './node_modules/@directivegames/genesys.js/eslint-rules/no-override-methods.js';
|
|
5
|
+
import noAsyncOverrideMismatch from './node_modules/@directivegames/genesys.js/eslint-rules/no-async-override-mismatch.js';
|
|
6
|
+
import noDeprecatedConstructor from './node_modules/@directivegames/genesys.js/eslint-rules/no-deprecated-constructor.js';
|
|
6
7
|
export default [
|
|
7
8
|
{
|
|
8
9
|
ignores: ['dist/**', '.engine/**', 'node_modules/**']
|
|
@@ -21,7 +22,8 @@ export default [
|
|
|
21
22
|
'no-override-methods': noOverrideMethods,
|
|
22
23
|
'no-default-class-fields': noDefaultClassFields,
|
|
23
24
|
'default-getter-return-type': defaultGetterReturnType,
|
|
24
|
-
'
|
|
25
|
+
'no-async-override-mismatch': noAsyncOverrideMismatch,
|
|
26
|
+
'no-deprecated-constructor': noDeprecatedConstructor
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
},
|
|
@@ -29,7 +31,8 @@ export default [
|
|
|
29
31
|
'custom/no-override-methods': 'error',
|
|
30
32
|
'custom/no-default-class-fields': 'error',
|
|
31
33
|
'custom/default-getter-return-type': 'error',
|
|
32
|
-
'custom/
|
|
34
|
+
'custom/no-async-override-mismatch': 'error',
|
|
35
|
+
'custom/no-deprecated-constructor': 'error'
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
{
|
package/dist/src/dependencies.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Includes dependencies from the main package.
|
|
10
10
|
*/
|
|
11
11
|
export const DEPENDENCIES = {
|
|
12
|
-
'@directivegames/genesys.js': '4.1.
|
|
12
|
+
'@directivegames/genesys.js': '4.1.11',
|
|
13
13
|
'@electron/rebuild': '4.0.1',
|
|
14
14
|
'@emotion/react': '11.14.0',
|
|
15
15
|
'@emotion/styled': '11.14.1',
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import tsParser from '@typescript-eslint/parser';
|
|
2
2
|
import noDefaultClassFields from './node_modules/@directivegames/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
3
|
import defaultGetterReturnType from './node_modules/@directivegames/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
-
import constructorTypeConsistency from './node_modules/@directivegames/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
4
|
import noOverrideMethods from './node_modules/@directivegames/genesys.js/eslint-rules/no-override-methods.js';
|
|
5
|
+
import noAsyncOverrideMismatch from './node_modules/@directivegames/genesys.js/eslint-rules/no-async-override-mismatch.js';
|
|
6
|
+
import noDeprecatedConstructor from './node_modules/@directivegames/genesys.js/eslint-rules/no-deprecated-constructor.js';
|
|
6
7
|
export default [
|
|
7
8
|
{
|
|
8
9
|
ignores: ['dist/**', '.engine/**', 'node_modules/**']
|
|
@@ -21,7 +22,8 @@ export default [
|
|
|
21
22
|
'no-override-methods': noOverrideMethods,
|
|
22
23
|
'no-default-class-fields': noDefaultClassFields,
|
|
23
24
|
'default-getter-return-type': defaultGetterReturnType,
|
|
24
|
-
'
|
|
25
|
+
'no-async-override-mismatch': noAsyncOverrideMismatch,
|
|
26
|
+
'no-deprecated-constructor': noDeprecatedConstructor
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
},
|
|
@@ -29,7 +31,8 @@ export default [
|
|
|
29
31
|
'custom/no-override-methods': 'error',
|
|
30
32
|
'custom/no-default-class-fields': 'error',
|
|
31
33
|
'custom/default-getter-return-type': 'error',
|
|
32
|
-
'custom/
|
|
34
|
+
'custom/no-async-override-mismatch': 'error',
|
|
35
|
+
'custom/no-deprecated-constructor': 'error'
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
38
|
{
|
|
@@ -15,7 +15,7 @@ class FirstPersonGame extends ENGINE.BaseGameLoop {
|
|
|
15
15
|
// now create the pawn
|
|
16
16
|
this.pawn = FirstPersonPlayer.create({ position });
|
|
17
17
|
// create the controller and possess the pawn
|
|
18
|
-
this.controller =
|
|
18
|
+
this.controller = ENGINE.PlayerController.create();
|
|
19
19
|
this.controller.possess(this.pawn);
|
|
20
20
|
// add both to the world
|
|
21
21
|
this.world.addActors(this.pawn, this.controller);
|
|
@@ -15,7 +15,7 @@ class MyGame extends ENGINE.BaseGameLoop {
|
|
|
15
15
|
// now create the pawn
|
|
16
16
|
this.pawn = FPSPlayer.create({ position });
|
|
17
17
|
// create the controller and possess the pawn
|
|
18
|
-
this.controller =
|
|
18
|
+
this.controller = ENGINE.PlayerController.create();
|
|
19
19
|
this.controller.possess(this.pawn);
|
|
20
20
|
// add both to the world
|
|
21
21
|
this.world.addActors(this.pawn, this.controller);
|
|
@@ -26,7 +26,7 @@ let FPSPlayer = class FPSPlayer extends ENGINE.Pawn {
|
|
|
26
26
|
// set proper camera height for first person view
|
|
27
27
|
camera.position.set(0, ENGINE.CHARACTER_HEIGHT * 0.4, 0);
|
|
28
28
|
// create the weapon and attach it to the camera
|
|
29
|
-
const weapon =
|
|
29
|
+
const weapon = DefaultWeapon.create();
|
|
30
30
|
camera.add(weapon);
|
|
31
31
|
// use a simple capsule geometry as the root component
|
|
32
32
|
const rootComponent = ENGINE.MeshComponent.create({
|
|
@@ -15,7 +15,7 @@ class MyGame extends ENGINE.BaseGameLoop {
|
|
|
15
15
|
// create the pawn with simple movement mechanics
|
|
16
16
|
this.pawn = FreeCameraPlayer.create({ position });
|
|
17
17
|
// create the controller and possess the pawn
|
|
18
|
-
this.controller =
|
|
18
|
+
this.controller = ENGINE.PlayerController.create();
|
|
19
19
|
this.controller.possess(this.pawn);
|
|
20
20
|
// add both to the world
|
|
21
21
|
this.world.addActors(this.pawn, this.controller);
|
|
@@ -33,7 +33,7 @@ class SideScrollerGame extends ENGINE.BaseGameLoop {
|
|
|
33
33
|
const position = new THREE.Vector3(spawnX, ENGINE.CHARACTER_HEIGHT / 2, 0);
|
|
34
34
|
this.player = SideScrollerPlayer.create({ position });
|
|
35
35
|
// Create the controller and possess the player
|
|
36
|
-
this.playerController =
|
|
36
|
+
this.playerController = ENGINE.PlayerController.create();
|
|
37
37
|
this.playerController.possess(this.player);
|
|
38
38
|
// Add both to the world
|
|
39
39
|
this.world.addActors(this.player, this.playerController);
|
|
@@ -148,7 +148,7 @@ export class SideScrollerLevelGenerator {
|
|
|
148
148
|
// Enable shadow casting and receiving
|
|
149
149
|
meshComponent.castShadow = true;
|
|
150
150
|
meshComponent.receiveShadow = true;
|
|
151
|
-
const actor =
|
|
151
|
+
const actor = ENGINE.Actor.create();
|
|
152
152
|
actor.setRootComponent(meshComponent, false);
|
|
153
153
|
return actor;
|
|
154
154
|
}
|
|
@@ -169,7 +169,7 @@ export class SideScrollerLevelGenerator {
|
|
|
169
169
|
enabled: false,
|
|
170
170
|
},
|
|
171
171
|
});
|
|
172
|
-
const chunkBoundary =
|
|
172
|
+
const chunkBoundary = ENGINE.Actor.create();
|
|
173
173
|
chunkBoundary.setRootComponent(meshComponent, false);
|
|
174
174
|
return chunkBoundary;
|
|
175
175
|
}
|
|
@@ -191,7 +191,7 @@ export class SideScrollerLevelGenerator {
|
|
|
191
191
|
});
|
|
192
192
|
// Enable shadow receiving
|
|
193
193
|
groundMeshComponent.receiveShadow = true;
|
|
194
|
-
const actor =
|
|
194
|
+
const actor = ENGINE.Actor.create();
|
|
195
195
|
actor.setRootComponent(groundMeshComponent, false);
|
|
196
196
|
return actor;
|
|
197
197
|
}
|
|
@@ -61,8 +61,8 @@ let SideScrollerPlayer = class SideScrollerPlayer extends ENGINE.ThirdPersonChar
|
|
|
61
61
|
this.camera = new THREE.PerspectiveCamera(CAMERA_SETTINGS.FOV, 1, CAMERA_SETTINGS.NEAR, CAMERA_SETTINGS.FAR);
|
|
62
62
|
this.enableDirectionalLightFollowing = true;
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
doBeginPlay() {
|
|
65
|
+
super.doBeginPlay();
|
|
66
66
|
this.getWorld()?.setOverrideCamera(this.camera);
|
|
67
67
|
}
|
|
68
68
|
tickPrePhysics(deltaTime) {
|
|
@@ -15,7 +15,7 @@ class ThirdPersonGame extends ENGINE.BaseGameLoop {
|
|
|
15
15
|
// create the pawn
|
|
16
16
|
this.pawn = ThirdPersonPlayer.create({ position });
|
|
17
17
|
// create the controller and possess the pawn
|
|
18
|
-
this.controller =
|
|
18
|
+
this.controller = ENGINE.PlayerController.create();
|
|
19
19
|
this.controller.possess(this.pawn);
|
|
20
20
|
// add both to the world
|
|
21
21
|
this.world.addActors(this.pawn, this.controller);
|
|
@@ -16,7 +16,7 @@ class MyGame extends ENGINE.BaseGameLoop {
|
|
|
16
16
|
// create the pawn
|
|
17
17
|
this.pawn = VehiclePlayer.create({ position });
|
|
18
18
|
// create the controller and possess the pawn
|
|
19
|
-
this.controller =
|
|
19
|
+
this.controller = ENGINE.PlayerController.create();
|
|
20
20
|
this.controller.possess(this.pawn);
|
|
21
21
|
// create UI hints
|
|
22
22
|
const uiHints = UIHints.create();
|
|
@@ -52,8 +52,8 @@ let VehiclePlayer = class VehiclePlayer extends ENGINE.ThirdPersonCharacterPawn
|
|
|
52
52
|
// set the pawn to be transient so it's never saved in the level
|
|
53
53
|
this.setTransient(true);
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
doBeginPlay() {
|
|
56
|
+
super.doBeginPlay();
|
|
57
57
|
this.setupVehicleInteraction();
|
|
58
58
|
}
|
|
59
59
|
setupVehicleInteraction() {
|
|
@@ -14,8 +14,8 @@ let UIHints = class UIHints extends ENGINE.Actor {
|
|
|
14
14
|
super();
|
|
15
15
|
this.setTransient(true); // Don't save this UI element to the level
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
doBeginPlay() {
|
|
18
|
+
super.doBeginPlay();
|
|
19
19
|
this.createHUD();
|
|
20
20
|
}
|
|
21
21
|
doEndPlay() {
|
|
@@ -36,7 +36,7 @@ class MyGame extends ENGINE.BaseGameLoop {
|
|
|
36
36
|
maxTeleportDistance: 15
|
|
37
37
|
});
|
|
38
38
|
// create the controller and possess the pawn
|
|
39
|
-
this.controller =
|
|
39
|
+
this.controller = ENGINE.PlayerController.create();
|
|
40
40
|
this.controller.possess(this.pawn);
|
|
41
41
|
this.pawn.addComponent(ENGINE.VRGrabComponent.create());
|
|
42
42
|
this.pawn.addComponent(ENGINE.VRSnapTurnComponent.create({ angleDeg: this.pawn.getSnapTurnAngleDegrees() }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@directivegames/genesys.sdk",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.4",
|
|
4
4
|
"description": "Genesys SDK - A development toolkit for game development",
|
|
5
5
|
"author": "Directive Games",
|
|
6
6
|
"main": "index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dev:vite-old": "vite",
|
|
34
34
|
"dev-old": "pnpm compile && concurrently -k -n MAIN,PRELOAD,VITE \"pnpm dev:main\" \"pnpm dev:preload\" \"pnpm dev:vite-old\" \"pnpm dev:electron-old\"",
|
|
35
35
|
"compile": "tsc -p tsconfig.json && tsc -p tsconfig.preload.json",
|
|
36
|
-
"build": "vite build && pnpm compile",
|
|
36
|
+
"build": "vite build && pnpm compile && pnpm lint",
|
|
37
37
|
"dist": "pnpm build && electron-builder",
|
|
38
38
|
"lint": "eslint . --fix --ext .ts,.tsx",
|
|
39
39
|
"pack": "pnpm build && pnpm pack",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
|
-
"@directivegames/genesys.js": "^4.
|
|
112
|
+
"@directivegames/genesys.js": "^4.1.11",
|
|
113
113
|
"@electron/rebuild": "^4.0.1",
|
|
114
114
|
"@emotion/react": "^11.14.0",
|
|
115
115
|
"@emotion/styled": "^11.14.0",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import tsParser from '@typescript-eslint/parser';
|
|
2
2
|
import noDefaultClassFields from './node_modules/@directivegames/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
3
|
import defaultGetterReturnType from './node_modules/@directivegames/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
-
import constructorTypeConsistency from './node_modules/@directivegames/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
4
|
import noOverrideMethods from './node_modules/@directivegames/genesys.js/eslint-rules/no-override-methods.js';
|
|
6
|
-
|
|
5
|
+
import noAsyncOverrideMismatch from './node_modules/@directivegames/genesys.js/eslint-rules/no-async-override-mismatch.js';
|
|
6
|
+
import noDeprecatedConstructor from './node_modules/@directivegames/genesys.js/eslint-rules/no-deprecated-constructor.js';
|
|
7
7
|
|
|
8
8
|
export default [
|
|
9
9
|
{
|
|
@@ -23,7 +23,8 @@ export default [
|
|
|
23
23
|
'no-override-methods': noOverrideMethods,
|
|
24
24
|
'no-default-class-fields': noDefaultClassFields,
|
|
25
25
|
'default-getter-return-type': defaultGetterReturnType,
|
|
26
|
-
'
|
|
26
|
+
'no-async-override-mismatch': noAsyncOverrideMismatch,
|
|
27
|
+
'no-deprecated-constructor': noDeprecatedConstructor
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
},
|
|
@@ -31,7 +32,8 @@ export default [
|
|
|
31
32
|
'custom/no-override-methods': 'error',
|
|
32
33
|
'custom/no-default-class-fields': 'error',
|
|
33
34
|
'custom/default-getter-return-type': 'error',
|
|
34
|
-
'custom/
|
|
35
|
+
'custom/no-async-override-mismatch': 'error',
|
|
36
|
+
'custom/no-deprecated-constructor': 'error'
|
|
35
37
|
}
|
|
36
38
|
},
|
|
37
39
|
{
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import tsParser from '@typescript-eslint/parser';
|
|
2
2
|
import noDefaultClassFields from './node_modules/@directivegames/genesys.js/eslint-rules/no-default-class-fields.js';
|
|
3
3
|
import defaultGetterReturnType from './node_modules/@directivegames/genesys.js/eslint-rules/default-getter-return-type.js';
|
|
4
|
-
import constructorTypeConsistency from './node_modules/@directivegames/genesys.js/eslint-rules/constructor-type-consistency.js';
|
|
5
4
|
import noOverrideMethods from './node_modules/@directivegames/genesys.js/eslint-rules/no-override-methods.js';
|
|
5
|
+
import noAsyncOverrideMismatch from './node_modules/@directivegames/genesys.js/eslint-rules/no-async-override-mismatch.js';
|
|
6
|
+
import noDeprecatedConstructor from './node_modules/@directivegames/genesys.js/eslint-rules/no-deprecated-constructor.js';
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
export default [
|
|
@@ -23,7 +24,8 @@ export default [
|
|
|
23
24
|
'no-override-methods': noOverrideMethods,
|
|
24
25
|
'no-default-class-fields': noDefaultClassFields,
|
|
25
26
|
'default-getter-return-type': defaultGetterReturnType,
|
|
26
|
-
'
|
|
27
|
+
'no-async-override-mismatch': noAsyncOverrideMismatch,
|
|
28
|
+
'no-deprecated-constructor': noDeprecatedConstructor
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
},
|
|
@@ -31,7 +33,8 @@ export default [
|
|
|
31
33
|
'custom/no-override-methods': 'error',
|
|
32
34
|
'custom/no-default-class-fields': 'error',
|
|
33
35
|
'custom/default-getter-return-type': 'error',
|
|
34
|
-
'custom/
|
|
36
|
+
'custom/no-async-override-mismatch': 'error',
|
|
37
|
+
'custom/no-deprecated-constructor': 'error'
|
|
35
38
|
}
|
|
36
39
|
},
|
|
37
40
|
{
|
|
@@ -22,7 +22,7 @@ class FirstPersonGame extends ENGINE.BaseGameLoop {
|
|
|
22
22
|
this.pawn = FirstPersonPlayer.create({ position });
|
|
23
23
|
|
|
24
24
|
// create the controller and possess the pawn
|
|
25
|
-
this.controller =
|
|
25
|
+
this.controller = ENGINE.PlayerController.create();
|
|
26
26
|
this.controller.possess(this.pawn);
|
|
27
27
|
|
|
28
28
|
// add both to the world
|
|
@@ -22,7 +22,7 @@ class MyGame extends ENGINE.BaseGameLoop {
|
|
|
22
22
|
this.pawn = FPSPlayer.create({ position });
|
|
23
23
|
|
|
24
24
|
// create the controller and possess the pawn
|
|
25
|
-
this.controller =
|
|
25
|
+
this.controller = ENGINE.PlayerController.create();
|
|
26
26
|
this.controller.possess(this.pawn);
|
|
27
27
|
|
|
28
28
|
// add both to the world
|
|
@@ -31,7 +31,7 @@ export class FPSPlayer extends ENGINE.Pawn {
|
|
|
31
31
|
camera.position.set(0, ENGINE.CHARACTER_HEIGHT * 0.4, 0);
|
|
32
32
|
|
|
33
33
|
// create the weapon and attach it to the camera
|
|
34
|
-
const weapon =
|
|
34
|
+
const weapon = DefaultWeapon.create();
|
|
35
35
|
camera.add(weapon);
|
|
36
36
|
|
|
37
37
|
// use a simple capsule geometry as the root component
|
|
@@ -22,7 +22,7 @@ class MyGame extends ENGINE.BaseGameLoop {
|
|
|
22
22
|
this.pawn = FreeCameraPlayer.create({ position });
|
|
23
23
|
|
|
24
24
|
// create the controller and possess the pawn
|
|
25
|
-
this.controller =
|
|
25
|
+
this.controller = ENGINE.PlayerController.create();
|
|
26
26
|
this.controller.possess(this.pawn);
|
|
27
27
|
|
|
28
28
|
// add both to the world
|
|
@@ -43,7 +43,7 @@ class SideScrollerGame extends ENGINE.BaseGameLoop {
|
|
|
43
43
|
this.player = SideScrollerPlayer.create({ position });
|
|
44
44
|
|
|
45
45
|
// Create the controller and possess the player
|
|
46
|
-
this.playerController =
|
|
46
|
+
this.playerController = ENGINE.PlayerController.create();
|
|
47
47
|
this.playerController.possess(this.player);
|
|
48
48
|
|
|
49
49
|
// Add both to the world
|
|
@@ -213,7 +213,7 @@ export class SideScrollerLevelGenerator {
|
|
|
213
213
|
meshComponent.castShadow = true;
|
|
214
214
|
meshComponent.receiveShadow = true;
|
|
215
215
|
|
|
216
|
-
const actor =
|
|
216
|
+
const actor = ENGINE.Actor.create();
|
|
217
217
|
actor.setRootComponent(meshComponent, false);
|
|
218
218
|
return actor;
|
|
219
219
|
}
|
|
@@ -246,7 +246,7 @@ export class SideScrollerLevelGenerator {
|
|
|
246
246
|
},
|
|
247
247
|
});
|
|
248
248
|
|
|
249
|
-
const chunkBoundary =
|
|
249
|
+
const chunkBoundary = ENGINE.Actor.create();
|
|
250
250
|
chunkBoundary.setRootComponent(meshComponent, false);
|
|
251
251
|
return chunkBoundary;
|
|
252
252
|
}
|
|
@@ -281,7 +281,7 @@ export class SideScrollerLevelGenerator {
|
|
|
281
281
|
// Enable shadow receiving
|
|
282
282
|
groundMeshComponent.receiveShadow = true;
|
|
283
283
|
|
|
284
|
-
const actor =
|
|
284
|
+
const actor = ENGINE.Actor.create();
|
|
285
285
|
actor.setRootComponent(groundMeshComponent, false);
|
|
286
286
|
return actor;
|
|
287
287
|
}
|
|
@@ -71,8 +71,8 @@ export class SideScrollerPlayer extends ENGINE.ThirdPersonCharacterPawn {
|
|
|
71
71
|
this.enableDirectionalLightFollowing = true;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
public override
|
|
75
|
-
|
|
74
|
+
public override doBeginPlay(): void {
|
|
75
|
+
super.doBeginPlay();
|
|
76
76
|
this.getWorld()?.setOverrideCamera(this.camera);
|
|
77
77
|
}
|
|
78
78
|
|
|
@@ -22,7 +22,7 @@ class ThirdPersonGame extends ENGINE.BaseGameLoop {
|
|
|
22
22
|
this.pawn = ThirdPersonPlayer.create({ position });
|
|
23
23
|
|
|
24
24
|
// create the controller and possess the pawn
|
|
25
|
-
this.controller =
|
|
25
|
+
this.controller = ENGINE.PlayerController.create();
|
|
26
26
|
this.controller.possess(this.pawn);
|
|
27
27
|
|
|
28
28
|
// add both to the world
|
|
@@ -23,7 +23,7 @@ class MyGame extends ENGINE.BaseGameLoop {
|
|
|
23
23
|
this.pawn = VehiclePlayer.create({ position });
|
|
24
24
|
|
|
25
25
|
// create the controller and possess the pawn
|
|
26
|
-
this.controller =
|
|
26
|
+
this.controller = ENGINE.PlayerController.create();
|
|
27
27
|
this.controller.possess(this.pawn);
|
|
28
28
|
|
|
29
29
|
// create UI hints
|
|
@@ -58,8 +58,8 @@ export class VehiclePlayer extends ENGINE.ThirdPersonCharacterPawn {
|
|
|
58
58
|
this.setTransient(true);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
protected override
|
|
62
|
-
|
|
61
|
+
protected override doBeginPlay(): void {
|
|
62
|
+
super.doBeginPlay();
|
|
63
63
|
this.setupVehicleInteraction();
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -12,8 +12,8 @@ export class UIHints extends ENGINE.Actor {
|
|
|
12
12
|
this.setTransient(true); // Don't save this UI element to the level
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
protected override
|
|
16
|
-
|
|
15
|
+
protected override doBeginPlay(): void {
|
|
16
|
+
super.doBeginPlay();
|
|
17
17
|
this.createHUD();
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -44,7 +44,7 @@ class MyGame extends ENGINE.BaseGameLoop {
|
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
// create the controller and possess the pawn
|
|
47
|
-
this.controller =
|
|
47
|
+
this.controller = ENGINE.PlayerController.create();
|
|
48
48
|
this.controller.possess(this.pawn);
|
|
49
49
|
|
|
50
50
|
this.pawn.addComponent(ENGINE.VRGrabComponent.create());
|