This commit is contained in:
Bill 2021-08-21 00:52:44 -04:00
parent 55666e8d55
commit 458a74b5a7
3 changed files with 8 additions and 35 deletions

View File

@ -82,8 +82,6 @@ export class AssetManager extends Disposable implements IAssetManager
{ {
if(!data) return null; if(!data) return null;
console.log(data);
const collection = new GraphicAssetCollection(data, spritesheet); const collection = new GraphicAssetCollection(data, spritesheet);
if(collection) if(collection)

View File

@ -24,14 +24,14 @@ export class PetSizeData extends AnimationSizeData
if(postures.defaultPosture && postures.defaultPosture.length) this._defaultPosture = postures.defaultPosture; if(postures.defaultPosture && postures.defaultPosture.length) this._defaultPosture = postures.defaultPosture;
// for(const posture of postures.postures) for(const posture of postures.postures)
// { {
// if(this._posturesToAnimations.get(posture.id)) continue; if(this._posturesToAnimations.get(posture.id)) continue;
// if(this._defaultPosture === null) this._defaultPosture = posture.id; if(this._defaultPosture === null) this._defaultPosture = posture.id;
// this._posturesToAnimations.set(posture.id, posture.animationId); this._posturesToAnimations.set(posture.id, posture.animationId);
// } }
if(this._posturesToAnimations.get(this._defaultPosture) === undefined) return false; if(this._posturesToAnimations.get(this._defaultPosture) === undefined) return false;

View File

@ -184,33 +184,8 @@ export class PetVisualization extends FurnitureAnimatedVisualization
if(this.updateModelCounter === model.updateCounter) return false; if(this.updateModelCounter === model.updateCounter) return false;
let posture = model.getValue<string>(RoomObjectVariable.FIGURE_POSTURE); const posture = model.getValue<string>(RoomObjectVariable.FIGURE_POSTURE);
let gesture = model.getValue<string>(RoomObjectVariable.FIGURE_GESTURE); const gesture = model.getValue<string>(RoomObjectVariable.FIGURE_GESTURE);
const tempPosture = model.getValue<number>(RoomObjectVariable.FIGURE_POSTURE);
if(!isNaN(tempPosture))
{
const totalPostures = this._data.totalPostures(this._scale);
if(totalPostures > 0)
{
posture = this._data.animationToPosture(this._scale, (tempPosture % totalPostures), true);
gesture = null;
}
}
const tempGesture = model.getValue<number>(RoomObjectVariable.FIGURE_GESTURE);
if(!isNaN(tempGesture))
{
const totalGestures = this._data.totalGestures(this._scale);
if(totalGestures > 0)
{
gesture = this._data.animationToGesture(this._scale, (tempGesture % totalGestures));
}
}
this.setPostureAndGesture(posture, gesture); this.setPostureAndGesture(posture, gesture);