diff --git a/src/graphics/FAS/smokeDetector/SmokeDetector.ts b/src/graphics/FAS/smokeDetector/SmokeDetector.ts index 5426141..514be5a 100644 --- a/src/graphics/FAS/smokeDetector/SmokeDetector.ts +++ b/src/graphics/FAS/smokeDetector/SmokeDetector.ts @@ -1,8 +1,8 @@ import { GraphicData, JlGraphic, JlGraphicTemplate } from 'jl-graphic'; import { Assets, Sprite, Spritesheet, Texture } from 'pixi.js'; // import { iscsGraphicData } from 'src/protos/iscs_graphic_data'; -import SmokeDetectorJson from './SmokeDetector.json'; -import SmokeDetectorAsset from './SmokeDetector.png'; +import FasDeviceJson from '../pndDevice/PngDevice.json'; +import FasDeviceAssets from '../pndDevice/FasDevice.png'; export interface ISmokeDetectorData extends GraphicData { get code(): string; @@ -11,6 +11,11 @@ export interface ISmokeDetectorData extends GraphicData { interface SmokeDetectorTextures { normal: Texture; + fireAlarm: Texture; + isolate: Texture; + fault: Texture; + forewarning: Texture; + interruption: Texture; } export class SmokeDetector extends JlGraphic { @@ -52,11 +57,16 @@ export class SmokeDetectorTemplate extends JlGraphicTemplate { throw new Error('资源未加载/加载失败'); } async loadAssets(): Promise { - const texture = await Assets.load(SmokeDetectorAsset); - const smokeDetectorSheet = new Spritesheet(texture, SmokeDetectorJson); + const texture = await Assets.load(FasDeviceAssets); + const smokeDetectorSheet = new Spritesheet(texture, FasDeviceJson); const result = await smokeDetectorSheet.parse(); this.smokeDetectorTextures = { - normal: result['normal.png'], + normal: result['smokeDetectorNormal.png'], + fireAlarm: result['smokeDetectorFireAlarm.png'], + isolate: result['smokeDetectorIsolate.png'], + fault: result['smokeDetectorFault.png'], + forewarning: result['smokeDetectorForewarning.png'], + interruption: result['smokeDetectorInterruption.png'], }; return this.smokeDetectorTextures as SmokeDetectorTextures; }