fixed elements not simulating
updated to godot 4.3
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FOU.Scripts.Elements;
|
||||
using Godot;
|
||||
|
||||
@@ -79,9 +78,6 @@ public class Chunk {
|
||||
}
|
||||
|
||||
public void SetElementActive(Element e, bool active) {
|
||||
if (e.Active == active) return;
|
||||
|
||||
GD.Print($"setting {e} to {active}");
|
||||
if (active && e.GetType() != typeof(Element))
|
||||
activeElements.Add(e);
|
||||
else
|
||||
|
||||
@@ -61,7 +61,7 @@ public class Element {
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
return $"{GetType()} {Position}[{Chunk.Index}]";
|
||||
return $"{GetType()} {Position}[{Chunk.Index}] {active}";
|
||||
}
|
||||
|
||||
protected virtual void Tick() {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Reflection;
|
||||
using FOU.Scripts;
|
||||
using FOU.Scripts.Elements;
|
||||
using Godot;
|
||||
|
||||
Reference in New Issue
Block a user