cleaned FloorRasterizer

This commit is contained in:
Dank074 2021-06-08 17:48:37 -05:00
parent c7487862a2
commit 2dd8306c3b
5 changed files with 18 additions and 18 deletions

View File

@ -5,7 +5,7 @@ import { FurnitureLogic } from './FurnitureLogic';
export class FurnitureScoreLogic extends FurnitureLogic
{
private static _Str_3536: number = 50;
private static UPDATE_INTERVAL: number = 50;
private static _Str_5967: number = 3000;
private _score: number;
@ -40,8 +40,8 @@ export class FurnitureScoreLogic extends FurnitureLogic
if(difference < 0) difference = -(difference);
if((difference * FurnitureScoreLogic._Str_3536) > FurnitureScoreLogic._Str_5967) this._scoreIncreaser = (FurnitureScoreLogic._Str_5967 / difference);
else this._scoreIncreaser = FurnitureScoreLogic._Str_3536;
if((difference * FurnitureScoreLogic.UPDATE_INTERVAL) > FurnitureScoreLogic._Str_5967) this._scoreIncreaser = (FurnitureScoreLogic._Str_5967 / difference);
else this._scoreIncreaser = FurnitureScoreLogic.UPDATE_INTERVAL;
this._scoreTimer = Nitro.instance.time;
}

View File

@ -7,7 +7,7 @@ import { FurnitureMultiStateLogic } from './FurnitureMultiStateLogic';
export class FurnitureVoteCounterLogic extends FurnitureMultiStateLogic
{
private static _Str_3536: number = 33;
private static UPDATE_INTERVAL: number = 33;
private static _Str_5967: number = 1000;
private _total: number;
@ -54,13 +54,13 @@ export class FurnitureVoteCounterLogic extends FurnitureMultiStateLogic
{
const difference = Math.abs((this._total - this._Str_8221));
if((difference * FurnitureVoteCounterLogic._Str_3536) > FurnitureVoteCounterLogic._Str_5967)
if((difference * FurnitureVoteCounterLogic.UPDATE_INTERVAL) > FurnitureVoteCounterLogic._Str_5967)
{
this._interval = (FurnitureVoteCounterLogic._Str_5967 / difference);
}
else
{
this._interval = FurnitureVoteCounterLogic._Str_3536;
this._interval = FurnitureVoteCounterLogic.UPDATE_INTERVAL;
}
this._lastUpdate = Nitro.instance.time;

View File

@ -10,7 +10,7 @@ import { LandscapePlane } from './LandscapePlane';
export class LandscapeRasterizer extends PlaneRasterizer
{
private static _Str_3536: number = 500;
private static UPDATE_INTERVAL: number = 500;
private _landscapeWidth: number = 0;
private _landscapeHeight: number = 0;
@ -33,10 +33,10 @@ export class LandscapeRasterizer extends PlaneRasterizer
const landscapes = this.data.landscapes;
if(landscapes && landscapes.length) this._Str_25478(landscapes);
if(landscapes && landscapes.length) this.parseLandscapes(landscapes);
}
private _Str_25478(k: any): void
private parseLandscapes(k: any): void
{
if(!k) return;
@ -137,8 +137,8 @@ export class LandscapeRasterizer extends PlaneRasterizer
{
const id = item.id;
const assetId = item.assetId;
const x = this._Str_21504(item.x || '', item.randomX || '');
const y = this._Str_21504(item.y || '', item.randomY || '');
const x = this.getCoordinateValue(item.x || '', item.randomX || '');
const y = this.getCoordinateValue(item.y || '', item.randomY || '');
const speedX = item.speedX ? item.speedX / Nitro.instance.getConfiguration<number>('animation.fps') : 0;
const speedY = item.speedY ? item.speedY / Nitro.instance.getConfiguration<number>('animation.fps') : 0;
@ -166,7 +166,7 @@ export class LandscapeRasterizer extends PlaneRasterizer
}
}
private _Str_21504(k: string, _arg_2: string): number
private getCoordinateValue(k: string, _arg_2: string): number
{
let _local_3 = 0;
@ -221,9 +221,9 @@ export class LandscapeRasterizer extends PlaneRasterizer
let planeBitmapData: PlaneBitmapData = null;
if(!plane.isStatic(scale) && (LandscapeRasterizer._Str_3536 > 0))
if(!plane.isStatic(scale) && (LandscapeRasterizer.UPDATE_INTERVAL > 0))
{
planeBitmapData = new PlaneBitmapData(graphic, ((Math.round((timeSinceStartMs / LandscapeRasterizer._Str_3536)) * LandscapeRasterizer._Str_3536) + LandscapeRasterizer._Str_3536));
planeBitmapData = new PlaneBitmapData(graphic, ((Math.round((timeSinceStartMs / LandscapeRasterizer.UPDATE_INTERVAL)) * LandscapeRasterizer.UPDATE_INTERVAL) + LandscapeRasterizer.UPDATE_INTERVAL));
}
else
{

View File

@ -12,10 +12,10 @@ export class FloorRasterizer extends PlaneRasterizer
const floors = this.data.floors;
if(floors && floors.length) this._Str_24495(floors);
if(floors && floors.length) this.parseFloors(floors);
}
private _Str_24495(k: any): void
private parseFloors(k: any): void
{
if(!k) return;

View File

@ -12,10 +12,10 @@ export class WallRasterizer extends PlaneRasterizer
const walls = this.data.walls;
if(walls && walls.length) this._Str_24495(walls);
if(walls && walls.length) this.parseWalls(walls);
}
private _Str_24495(k: any): void
private parseWalls(k: any): void
{
if(!k) return;