mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add tronworld model for raft
This commit is contained in:
parent
e734ada4b0
commit
9365a4845d
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user