mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2024-11-27 01:40:52 +01:00
Updates
This commit is contained in:
parent
175bca56ea
commit
30d56bf180
@ -4,38 +4,39 @@ import { HallOfFameEntryData } from './HallOfFameEntryData';
|
||||
|
||||
export class CommunityGoalHallOfFameData implements IDisposable
|
||||
{
|
||||
private _goalCode: string;
|
||||
private _hof: HallOfFameEntryData[];
|
||||
private _goalCode: string;
|
||||
private _hof: HallOfFameEntryData[];
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._hof = [];
|
||||
this._goalCode = wrapper.readString();
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._hof = [];
|
||||
this._goalCode = wrapper.readString();
|
||||
|
||||
const count = wrapper.readInt();
|
||||
for(let i = 0; i < count; i++)
|
||||
{
|
||||
this._hof.push(new HallOfFameEntryData(wrapper));
|
||||
}
|
||||
}
|
||||
const count = wrapper.readInt();
|
||||
|
||||
public dispose(): void
|
||||
{
|
||||
this._hof = null;
|
||||
}
|
||||
for(let i = 0; i < count; i++)
|
||||
{
|
||||
this._hof.push(new HallOfFameEntryData(wrapper));
|
||||
}
|
||||
}
|
||||
|
||||
public get disposed(): boolean
|
||||
{
|
||||
return this._hof == null;
|
||||
}
|
||||
public dispose(): void
|
||||
{
|
||||
this._hof = null;
|
||||
}
|
||||
|
||||
public get hof(): HallOfFameEntryData[]
|
||||
{
|
||||
return this._hof;
|
||||
}
|
||||
public get disposed(): boolean
|
||||
{
|
||||
return this._hof == null;
|
||||
}
|
||||
|
||||
public get goalCode(): string
|
||||
{
|
||||
return this._goalCode;
|
||||
}
|
||||
public get hof(): HallOfFameEntryData[]
|
||||
{
|
||||
return this._hof;
|
||||
}
|
||||
|
||||
public get goalCode(): string
|
||||
{
|
||||
return this._goalCode;
|
||||
}
|
||||
}
|
||||
|
@ -3,43 +3,43 @@ import { ILandingPageUserEntry } from './ILandingPageUserEntry';
|
||||
|
||||
export class HallOfFameEntryData implements ILandingPageUserEntry
|
||||
{
|
||||
private _userId: number;
|
||||
private _userName: string;
|
||||
private _figure: string;
|
||||
private _rank: number;
|
||||
private _currentScore: number;
|
||||
private _userId: number;
|
||||
private _userName: string;
|
||||
private _figure: string;
|
||||
private _rank: number;
|
||||
private _currentScore: number;
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._userId = wrapper.readInt();
|
||||
this._userName = wrapper.readString();
|
||||
this._figure = wrapper.readString();
|
||||
this._rank = wrapper.readInt();
|
||||
this._currentScore = wrapper.readInt();
|
||||
}
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
this._userId = wrapper.readInt();
|
||||
this._userName = wrapper.readString();
|
||||
this._figure = wrapper.readString();
|
||||
this._rank = wrapper.readInt();
|
||||
this._currentScore = wrapper.readInt();
|
||||
}
|
||||
|
||||
public get userId(): number
|
||||
{
|
||||
return this._userId;
|
||||
}
|
||||
public get userId(): number
|
||||
{
|
||||
return this._userId;
|
||||
}
|
||||
|
||||
public get userName(): string
|
||||
{
|
||||
return this._userName;
|
||||
}
|
||||
public get userName(): string
|
||||
{
|
||||
return this._userName;
|
||||
}
|
||||
|
||||
public get figure(): string
|
||||
{
|
||||
return this._figure;
|
||||
}
|
||||
public get figure(): string
|
||||
{
|
||||
return this._figure;
|
||||
}
|
||||
|
||||
public get rank(): number
|
||||
{
|
||||
return this._rank;
|
||||
}
|
||||
public get rank(): number
|
||||
{
|
||||
return this._rank;
|
||||
}
|
||||
|
||||
public get currentScore(): number
|
||||
{
|
||||
return this._currentScore;
|
||||
}
|
||||
public get currentScore(): number
|
||||
{
|
||||
return this._currentScore;
|
||||
}
|
||||
}
|
||||
|
@ -882,7 +882,7 @@ export class RoomObjectEventHandler extends Disposable implements IRoomCanvasMou
|
||||
const objectCategory = this._roomEngine.getRoomObjectCategoryForType(event.objectType);
|
||||
const selectedData = this.getSelectedRoomObjectData(roomId);
|
||||
|
||||
if(!selectedData)
|
||||
if(selectedData)
|
||||
{
|
||||
if((selectedData.category === objectCategory) && (selectedData.id === event.objectId))
|
||||
{
|
||||
|
@ -9,14 +9,13 @@ import { FurnitureVisualization } from './FurnitureVisualization';
|
||||
|
||||
export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
||||
{
|
||||
private static FRAME_INCREASE_AMOUNT: number = 1;
|
||||
|
||||
public static TYPE: string = RoomObjectVisualizationType.FURNITURE_ANIMATED;
|
||||
public static DEFAULT_ANIMATION_ID: number = 0;
|
||||
|
||||
protected _data: FurnitureAnimatedVisualizationData;
|
||||
|
||||
protected _state: number;
|
||||
protected _frameIncrease: number;
|
||||
private _animationData: AnimationStateData;
|
||||
private _animationScale: number;
|
||||
private _animationChangeTime: number;
|
||||
@ -28,6 +27,7 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
||||
super();
|
||||
|
||||
this._state = -1;
|
||||
this._frameIncrease = 1;
|
||||
this._animationData = new AnimationStateData();
|
||||
this._animationScale = 0;
|
||||
this._animationChangeTime = 0;
|
||||
@ -290,7 +290,7 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
||||
|
||||
if(!frameCount) frameCount = this._data.getStartFrame(scale, animationId, this._direction);
|
||||
|
||||
frameCount += FurnitureAnimatedVisualization.FRAME_INCREASE_AMOUNT;
|
||||
frameCount += this.frameIncrease;
|
||||
animationData.frameCounter = frameCount;
|
||||
animationData.animationOver = true;
|
||||
|
||||
@ -312,13 +312,13 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
||||
|
||||
if(frame)
|
||||
{
|
||||
if(frame.isLastFrame && (frame.remainingFrameRepeats <= FurnitureAnimatedVisualization.FRAME_INCREASE_AMOUNT))
|
||||
if(frame.isLastFrame && (frame.remainingFrameRepeats <= this.frameIncrease))
|
||||
{
|
||||
lastFramePlayed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if((this._directionChanged || !frame) || ((frame.remainingFrameRepeats >= 0) && ((frame.remainingFrameRepeats = (frame.remainingFrameRepeats - FurnitureAnimatedVisualization.FRAME_INCREASE_AMOUNT)) <= 0)))
|
||||
if((this._directionChanged || !frame) || ((frame.remainingFrameRepeats >= 0) && ((frame.remainingFrameRepeats = (frame.remainingFrameRepeats - this.frameIncrease)) <= 0)))
|
||||
{
|
||||
sequenceId = AnimationFrame.SEQUENCE_NOT_DEFINED;
|
||||
|
||||
@ -404,4 +404,9 @@ export class FurnitureAnimatedVisualization extends FurnitureVisualization
|
||||
|
||||
this._directionChanged = true;
|
||||
}
|
||||
|
||||
protected get frameIncrease(): number
|
||||
{
|
||||
return this._frameIncrease;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,16 @@
|
||||
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
||||
import { FurnitureAnimatedVisualization } from './FurnitureAnimatedVisualization';
|
||||
|
||||
export class FurnitureSoundBlockVisualization extends FurnitureAnimatedVisualization
|
||||
{
|
||||
private _internalFrameIncreaseCounter: number = 0;
|
||||
|
||||
}
|
||||
protected updateAnimations(scale: number): number
|
||||
{
|
||||
this._internalFrameIncreaseCounter = (this._internalFrameIncreaseCounter + this.object.model.getValue<number>(RoomObjectVariable.FURNITURE_SOUNDBLOCK_RELATIVE_ANIMATION_SPEED));
|
||||
this._frameIncrease = this._internalFrameIncreaseCounter;
|
||||
this._internalFrameIncreaseCounter = (this._internalFrameIncreaseCounter - this._frameIncrease);
|
||||
|
||||
return super.updateAnimations(scale);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { RoomObjectVariable } from '../../RoomObjectVariable';
|
||||
import { FurnitureDynamicThumbnailVisualization } from './FurnitureDynamicThumbnailVisualization';
|
||||
|
||||
export class FurnitureYoutubeVisualization extends FurnitureDynamicThumbnailVisualization
|
||||
@ -8,13 +9,8 @@ export class FurnitureYoutubeVisualization extends FurnitureDynamicThumbnailVisu
|
||||
{
|
||||
if(!this.object) return null;
|
||||
|
||||
return null;
|
||||
const url = this.object.model.getValue<string>(RoomObjectVariable.SESSION_URL_PREFIX);
|
||||
|
||||
// const data = this.object.model.getValue<any>(RoomObjectVariable.FURNITURE_DATA);
|
||||
// const url = this.object.model.getValue<string>(RoomObjectVariable.SESSION_URL_PREFIX);
|
||||
|
||||
// if(!data || !url) return null;
|
||||
|
||||
// return (url + FurnitureYoutubeVisualization.THUMBNAIL);
|
||||
return (url + FurnitureYoutubeVisualization.THUMBNAIL);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user