imperfect-space/scripts/GameObjects/Star.cs
2026-02-02 12:17:04 -05:00

39 lines
963 B
C#

using Godot;
public class Star(Sector sector, Vector3 localCoordinates) : GameObject(sector, localCoordinates)
{
public override void Simulate(double delta)
{
base.Simulate(delta);
}
public override Node3D Instantiate(Sector sector)
{
PackedScene prefab = ResourceLoader.Load<PackedScene>("res://prefabs/gameObjects/star.tscn");
StarNode instance = prefab.Instantiate<StarNode>();
instance.Name = $"Star-{UUID}";
instance.StarData = this;
UpdateSectorOffsetToMainPlayer();
return instance;
}
public override Godot.Collections.Dictionary NetworkWrite(long id, bool full)
{
Godot.Collections.Dictionary gameObjectData = base.NetworkWrite(id, full);
if (gameObjectData != null)
{
QueueManager.NetworkSyncQueue.Enqueue((id, gameObjectData));
}
DirtyBits = DirtyFlags.None;
return gameObjectData;
}
public override void NetworkRead(Godot.Collections.Dictionary gameObjectData)
{
base.NetworkRead(gameObjectData);
}
}