修改预设,力场形状显示开关
This commit is contained in:
1 parent
5f3a4a33fe
commit
4f2c980bac
9 files changed
+581
-18
No files matched your search
@@ -116,7 +116,7 @@ export function drawForceField(store: EditorStore, forceFieldGfx: Graphics | nul
|
||||
const sys = store.systems.find((item) => item.id === store.activeId)
|
||||
if (sys?.visible === false) return
|
||||
const cfg = sys?.config
|
||||
if (!cfg?.forceField || cfg.forceRadius <= 0) return
|
||||
if (!cfg?.forceField || !cfg.showForceFieldShape || cfg.forceRadius <= 0) return
|
||||
const x = cfg.forceCenterX
|
||||
const y = -cfg.forceCenterY
|
||||
const color = cfg.forceStrength >= 0 ? 0x58c7ff : 0xff6b7a
|
||||
@@ -140,7 +140,7 @@ export function drawVortex(store: EditorStore, vortexGfx: Graphics | null) {
|
||||
const sys = store.systems.find((item) => item.id === store.activeId)
|
||||
if (sys?.visible === false) return
|
||||
const cfg = sys?.config
|
||||
if (!cfg?.vortex || cfg.vortexRadius <= 0) return
|
||||
if (!cfg?.vortex || !cfg.showVortexShape || cfg.vortexRadius <= 0) return
|
||||
const x = cfg.vortexCenterX
|
||||
const y = -cfg.vortexCenterY
|
||||
const color = cfg.vortexStrength >= 0 ? 0xb97cff : 0xffa24c
|
||||
@@ -168,7 +168,7 @@ export function drawAttraction(store: EditorStore, attractionGfx: Graphics | nul
|
||||
const sys = store.systems.find((item) => item.id === store.activeId)
|
||||
if (sys?.visible === false) return
|
||||
const cfg = sys?.config
|
||||
if (!cfg?.attraction) return
|
||||
if (!cfg?.attraction || !cfg.showAttractionShape) return
|
||||
const x = cfg.attractionCenterX
|
||||
const y = -cfg.attractionCenterY
|
||||
const radius = Math.max(0, cfg.attractionRadius)
|
||||
|
||||
Reference in new issue
Block a user