Add tronworld model for raft

This commit is contained in:
Noah Pilarski 2025-04-08 22:06:34 -04:00
parent e734ada4b0
commit 9365a4845d
2 changed files with 17 additions and 0 deletions

View File

@ -45,6 +45,15 @@ namespace NewHorizons.Builder.Props.EchoesOfTheEye
lightSensor._illuminatingDreamLanternList = new List<DreamLanternController>();
lightSensor._lightSourceMask |= LightSourceType.DREAM_LANTERN;
}
// TODO: Change to one mesh
var twRaftRoot = new GameObject("Effects_IP_SIM_Raft");
twRaftRoot.transform.SetParent(_prefab.transform, false);
var twRaft = SearchUtilities.Find("DreamWorld_Body/Sector_DreamWorld/Interactibles_Dreamworld/DreamRaft_Body/Effects_IP_SIM_Raft_1Way")
.Instantiate(Vector3.zero, Quaternion.identity, twRaftRoot.transform).Rename("Effects_IP_SIM_Raft_1Way");
twRaft.Instantiate(Vector3.zero, Quaternion.Euler(0, 180, 0), twRaftRoot.transform).Rename(twRaft.name);
twRaft.Instantiate(Vector3.zero, Quaternion.Euler(0, 90, 0), twRaftRoot.transform).Rename(twRaft.name);
twRaft.Instantiate(Vector3.zero, Quaternion.Euler(0, -90, 0), twRaftRoot.transform).Rename(twRaft.name);
}
}
}

View File

@ -274,6 +274,14 @@ namespace NewHorizons.Utility
return UnityEngine.Object.Instantiate(original);
}
public static GameObject Instantiate(this GameObject original, Vector3 localPosition, Quaternion localRotation, Transform parent)
{
var copy = UnityEngine.Object.Instantiate(original, parent, false);
copy.transform.localPosition = localPosition;
copy.transform.localRotation = localRotation;
return copy;
}
public static T DontDestroyOnLoad<T>(this T target) where T : UnityEngine.Object
{
UnityEngine.Object.DontDestroyOnLoad(target);