fixed elements not simulating
updated to godot 4.3
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Godot.NET.Sdk/4.2.2">
|
<Project Sdk="Godot.NET.Sdk/4.3.0">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using FOU.Scripts.Elements;
|
using FOU.Scripts.Elements;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
@@ -79,9 +78,6 @@ public class Chunk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void SetElementActive(Element e, bool active) {
|
public void SetElementActive(Element e, bool active) {
|
||||||
if (e.Active == active) return;
|
|
||||||
|
|
||||||
GD.Print($"setting {e} to {active}");
|
|
||||||
if (active && e.GetType() != typeof(Element))
|
if (active && e.GetType() != typeof(Element))
|
||||||
activeElements.Add(e);
|
activeElements.Add(e);
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
return $"{GetType()} {Position}[{Chunk.Index}]";
|
return $"{GetType()} {Position}[{Chunk.Index}] {active}";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void Tick() {
|
protected virtual void Tick() {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
using System.Reflection;
|
|
||||||
using FOU.Scripts;
|
using FOU.Scripts;
|
||||||
using FOU.Scripts.Elements;
|
using FOU.Scripts.Elements;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ config_version=5
|
|||||||
|
|
||||||
config/name="FOU"
|
config/name="FOU"
|
||||||
run/main_scene="res://Scenes/main.tscn"
|
run/main_scene="res://Scenes/main.tscn"
|
||||||
config/features=PackedStringArray("4.2", "C#", "Forward Plus")
|
config/features=PackedStringArray("4.3", "C#", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
[dotnet]
|
[dotnet]
|
||||||
|
|||||||
Reference in New Issue
Block a user