This commit is contained in:
schmelczerandras 2020-10-25 17:54:45 +01:00
parent a66fa63b4b
commit efa838a2ad
20 changed files with 1691 additions and 368 deletions

View file

@ -44,7 +44,6 @@ export * from './transport/serialization/serialize';
export * from './transport/serialization/serializes-to';
export * from './transport/serialization/serializable';
export * from './transport/serialization/override-deserialization';
export * from './objects/types/character-base';
export * from './objects/types/character-team';
export * from './objects/types/player-character-base';
export * from './objects/types/lamp-base';

View file

@ -1,26 +0,0 @@
import { Circle } from '../../helper/circle';
import { Id } from '../../transport/identity';
import { serializable } from '../../transport/serialization/serializable';
import { GameObject } from '../game-object';
import { CharacterTeam } from './character-team';
@serializable
export class CharacterBase extends GameObject {
constructor(
id: Id,
public team: CharacterTeam,
public health: number,
public head?: Circle,
public leftFoot?: Circle,
public rightFoot?: Circle,
) {
super(id);
}
public onShoot(strength: number) {}
public toArray(): Array<any> {
const { id, team, health, head, leftFoot, rightFoot } = this;
return [id, team, health, head, leftFoot, rightFoot];
}
}

View file

@ -1,23 +1,23 @@
import { CharacterBase } from './character-base';
import { Circle } from '../../helper/circle';
import { Id } from '../../transport/identity';
import { serializable } from '../../transport/serialization/serializable';
import { GameObject } from '../game-object';
import { CharacterTeam } from './character-team';
@serializable
export class PlayerCharacterBase extends CharacterBase {
export class PlayerCharacterBase extends GameObject {
constructor(
id: Id,
public name: string,
public killCount: number,
public deathCount: number,
team: CharacterTeam,
health: number,
head?: Circle,
leftFoot?: Circle,
rightFoot?: Circle,
public team: CharacterTeam,
public health: number,
public head?: Circle,
public leftFoot?: Circle,
public rightFoot?: Circle,
) {
super(id, team, health, head, leftFoot, rightFoot);
super(id);
}
public onShoot(strength: number) {}

View file

@ -44,6 +44,64 @@ export const settings = {
backgroundGradient: [rgb255(90, 38, 43), rgb255(43, 39, 73)],
declaColor,
declaPlanetColor,
npcNames: [
'Adam',
'Clarence',
'Elliot',
'Elmer',
'Ernie',
'Eugene',
'Fergus',
'Ferris',
'Frank',
'Frasier',
'Fred',
'George',
'Graham',
'Harvey',
'Irwin',
'Larry',
'Lester',
'Marvin',
'Neil',
'Niles',
'Oliver',
'Blaise',
'Andrew',
'Opie',
'Ryan',
'Toby',
'Ulric',
'Ulysses',
'Uri',
'Waldo',
'Wally',
'Walt',
'Wesley',
'Yanni',
'Yogi',
'Yuri',
'Dean',
'Dustin',
'Ethan',
'Harold',
'Henry',
'Irving',
'Jason',
'Jenssen',
'Josh',
'Martin',
'Nick',
'Norm',
'Orin',
'Pat',
'Perry',
'Ron',
'Shawn',
'Tim',
'Will',
'Wyatt',
],
redColor,
redPlanetColor,
colorIndices: {