Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
orion3dgames committed May 30, 2024
1 parent 2e03029 commit c78346e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 905 deletions.
5 changes: 3 additions & 2 deletions construction/World And Story.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Eldoria was a quaint village nestled between lush forests and towering mountains
---

![Map of Eldoria](./map_eldoria.jpg)

---


Expand Down Expand Up @@ -35,7 +36,7 @@ Eldoria was a quaint village nestled between lush forests and towering mountains
* **Blacksmith Garin**: A master of the forge, providing essential equipment.
* **Merchant Elara**: A savvy trader in potions and enchanted items.
* **Sorceress Mira**: A wise mage who trained adventurers in offensive magic and resided in the Sorceress Tower.
* **Priestess Alice**: A devout priestess who taught defensive spells and sought help for the temple’s troubles.
* **Priestess Alice**: A devout priestess who taught defensive spells and sought help for the Temple’s troubles.
* **Farmer Jorin**: A simple farmer with untold stories.
* **Bartender Morin**: The keeper of the tavern and a source of many quests.
* **Caretaker Ren**: Guardian of the cemetery, harboring secrets of the Mausoleum.
Expand Down Expand Up @@ -88,7 +89,7 @@ Eldoria was a quaint village nestled between lush forests and towering mountains

---

### Quests
### Quests

#### Clearing the Cellar

Expand Down
3 changes: 1 addition & 2 deletions src/client/Controllers/GameController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export class GameController {
public selectedEntity;
public locale: "en";
public currentMs: number;
public camY: number;
public deltaCamY: number = 0;
public deltaCamY: number = 0; // offset for camera to prevent camera moving when the player rotates
public latestError: string;
public isMobile: boolean = false;
public currentChats = [];
Expand Down
7 changes: 2 additions & 5 deletions src/client/Entities/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,6 @@ export class Player extends Entity {
super.update(delta);

if (this && this.moveController) {
// global camera rotation
this._game.camY = this.cameraController._camRoot.rotation.y;

// tween entity
this.moveController.tween();
}
Expand Down Expand Up @@ -277,13 +274,13 @@ export class Player extends Entity {
// if dead
if (!this.isDeadUI && this.health < 1) {
this._ui._RessurectBox.open();
this.cameraController.bw(true);
this.cameraController.vfx_black_and_white_on();
this.isDeadUI = true;
}

// if ressurect
if (this.isDeadUI && this.health > 0) {
this.cameraController.bw(false);
this.cameraController.vfx_black_and_white_off();
this._ui._RessurectBox.close();
this.isDeadUI = false;
}
Expand Down
16 changes: 10 additions & 6 deletions src/client/Entities/Player/PlayerCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ export class PlayerCamera {
Math.abs(this._camRoot.rotation.x + this._input.movementY) < 0.5 ? this._camRoot.rotation.x + this._input.movementY : this._camRoot.rotation.x;
}

// delta
// set camera delta
this.player._game.deltaCamY = this.player._game.deltaCamY + this._input.movementX;

// set horizontal rotation
const rotationY = this._camRoot.rotation.y + this._input.movementX;

Expand All @@ -89,11 +89,15 @@ export class PlayerCamera {

// post processing effect black and white
// used when current player dies and click ressurects
public bw(activate: boolean) {
if (activate === true && !this._postProcess) {
this._postProcess = new BlackAndWhitePostProcess("bandw", 1.0, this.camera);
public vfx_black_and_white_on() {
if (this._postProcess) {
this._postProcess.dispose();
}
if (activate === false && this._postProcess) {
this._postProcess = new BlackAndWhitePostProcess("bandw", 1.0, this.camera);
}

public vfx_black_and_white_off() {
if (this._postProcess) {
this._postProcess.dispose();
}
}
Expand Down
Loading

0 comments on commit c78346e

Please sign in to comment.