Fixing typos.

Replaced connexion with connection and LogincScene with LoginScene
This commit is contained in:
David Négrier 2020-05-24 23:14:12 +02:00
parent b58eef6e7f
commit 1fa39b0781
8 changed files with 61 additions and 61 deletions

View file

@ -1,4 +1,4 @@
import {PointInterface} from "../../Connexion";
import {PointInterface} from "../../Connection";
export interface AddPlayerInterface {
userId: string;

View file

@ -1,6 +1,6 @@
import {GameScene} from "./GameScene";
import {
Connexion,
Connection,
GroupCreatedUpdatedMessageInterface,
ListMessageUserPositionInterface,
MessageUserJoined,
@ -8,7 +8,7 @@ import {
MessageUserPositionInterface,
Point,
PointInterface
} from "../../Connexion";
} from "../../Connection";
import {SimplePeerInterface, SimplePeer} from "../../WebRtc/SimplePeer";
import {AddPlayerInterface} from "./AddPlayerInterface";
import {ReconnectingSceneName} from "../Reconnecting/ReconnectingScene";
@ -32,7 +32,7 @@ export interface MapObject {
export class GameManager {
status: number;
private ConnexionInstance: Connexion;
private ConnectionInstance: Connection;
private currentGameScene: GameScene;
private playerName: string;
SimplePeer : SimplePeerInterface;
@ -45,9 +45,9 @@ export class GameManager {
connect(name: string, characterUserSelected : string) {
this.playerName = name;
this.characterUserSelected = characterUserSelected;
this.ConnexionInstance = new Connexion(this);
return this.ConnexionInstance.createConnexion(name, characterUserSelected).then((data : any) => {
this.SimplePeer = new SimplePeer(this.ConnexionInstance);
this.ConnectionInstance = new Connection(this);
return this.ConnectionInstance.createConnection(name, characterUserSelected).then((data : any) => {
this.SimplePeer = new SimplePeer(this.ConnectionInstance);
return data;
}).catch((err) => {
throw err;
@ -55,7 +55,7 @@ export class GameManager {
}
loadStartMap(){
return this.ConnexionInstance.loadStartMap().then((data) => {
return this.ConnectionInstance.loadStartMap().then((data) => {
return data;
}).catch((err) => {
throw err;
@ -77,7 +77,7 @@ export class GameManager {
}
joinRoom(sceneKey: string, startX: number, startY: number, direction: string, moving: boolean){
this.ConnexionInstance.joinARoom(sceneKey, startX, startY, direction, moving);
this.ConnectionInstance.joinARoom(sceneKey, startX, startY, direction, moving);
}
onUserJoins(message: MessageUserJoined): void {
@ -156,7 +156,7 @@ export class GameManager {
}
getPlayerId(): string {
return this.ConnexionInstance.userId;
return this.ConnectionInstance.userId;
}
getCharacterSelected(): string {
@ -164,7 +164,7 @@ export class GameManager {
}
pushPlayerPosition(event: HasMovedEvent) {
this.ConnexionInstance.sharePosition(event.x, event.y, event.direction, event.moving);
this.ConnectionInstance.sharePosition(event.x, event.y, event.direction, event.moving);
}
loadMap(mapUrl: string, scene: Phaser.Scenes.ScenePlugin, instance: string): string {

View file

@ -3,7 +3,7 @@ import {
GroupCreatedUpdatedMessageInterface,
MessageUserMovedInterface,
MessageUserPositionInterface, PointInterface, PositionInterface
} from "../../Connexion";
} from "../../Connection";
import {CurrentGamerInterface, GamerInterface, hasMovedEventName, Player} from "../Player/Player";
import { DEBUG_MODE, ZOOM_LEVEL} from "../../Enum/EnvironmentVariable";
import {ITiledMap, ITiledMapLayer, ITiledTileSet} from "../Map/ITiledMap";
@ -301,7 +301,7 @@ export class GameScene extends Phaser.Scene {
//initialise player
//TODO create animation moving between exit and start
this.CurrentPlayer = new Player(
null, // The current player is not has no id (because the id can change if connexion is lost and we should check that id using the GameManager.
null, // The current player is not has no id (because the id can change if connection is lost and we should check that id using the GameManager.
this,
this.startX,
this.startY,

View file

@ -6,7 +6,7 @@ import Image = Phaser.GameObjects.Image;
import Rectangle = Phaser.GameObjects.Rectangle;
import {PLAYER_RESOURCES} from "../Entity/PlayableCaracter";
import {cypressAsserter} from "../../Cypress/CypressAsserter";
import {GroupCreatedUpdatedMessageInterface, MessageUserJoined, MessageUserPositionInterface} from "../../Connexion";
import {GroupCreatedUpdatedMessageInterface, MessageUserJoined, MessageUserPositionInterface} from "../../Connection";
//todo: put this constants in a dedicated file
export const LoginSceneName = "LoginScene";
@ -16,7 +16,7 @@ enum LoginTextures {
mainFont = "main_font"
}
export class LogincScene extends Phaser.Scene {
export class LoginScene extends Phaser.Scene {
private nameInput: TextInput;
private textField: TextField;
private playButton: ClickButton;

View file

@ -1,6 +1,6 @@
import {getPlayerAnimations, PlayerAnimationNames} from "./Animation";
import {GameScene, Textures} from "../Game/GameScene";
import {MessageUserPositionInterface, PointInterface} from "../../Connexion";
import {MessageUserPositionInterface, PointInterface} from "../../Connection";
import {ActiveEventList, UserInputEvent, UserInputManager} from "../UserInput/UserInputManager";
import {PlayableCaracter} from "../Entity/PlayableCaracter";