From dee2b5ca7f2072a2a12790fb7b8c13e14dee3b88 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Mon, 11 Nov 2024 17:30:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=83=9F=E6=84=9F=E8=AE=BE=E5=A4=87=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FAS/smokeDetector/SmokeDetector.ts | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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; }