mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
fixed line endings
This commit is contained in:
parent
5943e306ba
commit
5cc232ee8c
@ -157,9 +157,9 @@ namespace NewHorizons.Builder.Props
|
|||||||
// Fix vision torch
|
// Fix vision torch
|
||||||
if (component is VisionTorchItem)
|
if (component is VisionTorchItem)
|
||||||
{
|
{
|
||||||
(component as VisionTorchItem).enabled = true;
|
(component as VisionTorchItem).enabled = true;
|
||||||
(component as VisionTorchItem).mindProjectorTrigger.enabled = true;
|
(component as VisionTorchItem).mindProjectorTrigger.enabled = true;
|
||||||
(component as VisionTorchItem).mindSlideProjector._mindProjectorImageEffect = GameObject.Find("Player_Body/PlayerCamera").GetComponent<MindProjectorImageEffect>();
|
(component as VisionTorchItem).mindSlideProjector._mindProjectorImageEffect = GameObject.Find("Player_Body/PlayerCamera").GetComponent<MindProjectorImageEffect>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -73,11 +73,11 @@ namespace NewHorizons.Builder.Props
|
|||||||
AddModules(slideInfo, ref slide);
|
AddModules(slideInfo, ref slide);
|
||||||
|
|
||||||
slideCollection.slides[i] = slide;
|
slideCollection.slides[i] = slide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this variable just lets us track how many of the first 15 slides have been loaded.
|
// this variable just lets us track how many of the first 15 slides have been loaded.
|
||||||
// this way as soon as the last one is loaded (due to async loading, this may be
|
// this way as soon as the last one is loaded (due to async loading, this may be
|
||||||
// slide 7, or slide 3, or whatever), we can build the slide reel texture. This allows us
|
// slide 7, or slide 3, or whatever), we can build the slide reel texture. This allows us
|
||||||
// to avoid doing a "is every element in the array `textures` not null" check every time a texture finishes loading
|
// to avoid doing a "is every element in the array `textures` not null" check every time a texture finishes loading
|
||||||
int displaySlidesLoaded = 0;
|
int displaySlidesLoaded = 0;
|
||||||
imageLoader.imageLoadedEvent.AddListener(
|
imageLoader.imageLoadedEvent.AddListener(
|
||||||
@ -93,7 +93,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (displaySlidesLoaded >= textures.Length)
|
if (displaySlidesLoaded >= textures.Length)
|
||||||
{
|
{
|
||||||
// all textures required to build the reel's textures have been loaded
|
// all textures required to build the reel's textures have been loaded
|
||||||
var slidesBack = slideReelObj.transform.Find("Props_IP_SlideReel_7/Slides_Back").GetComponent<MeshRenderer>();
|
var slidesBack = slideReelObj.transform.Find("Props_IP_SlideReel_7/Slides_Back").GetComponent<MeshRenderer>();
|
||||||
var slidesFront = slideReelObj.transform.Find("Props_IP_SlideReel_7/Slides_Front").GetComponent<MeshRenderer>();
|
var slidesFront = slideReelObj.transform.Find("Props_IP_SlideReel_7/Slides_Front").GetComponent<MeshRenderer>();
|
||||||
@ -248,12 +248,12 @@ namespace NewHorizons.Builder.Props
|
|||||||
//
|
//
|
||||||
|
|
||||||
var mindSlideProjector = standingTorch.GetComponent<MindSlideProjector>();
|
var mindSlideProjector = standingTorch.GetComponent<MindSlideProjector>();
|
||||||
mindSlideProjector._mindProjectorImageEffect = GameObject.Find("Player_Body/PlayerCamera").GetComponent<MindProjectorImageEffect>();
|
mindSlideProjector._mindProjectorImageEffect = GameObject.Find("Player_Body/PlayerCamera").GetComponent<MindProjectorImageEffect>();
|
||||||
|
|
||||||
// setup for visually supporting async texture loading
|
// setup for visually supporting async texture loading
|
||||||
mindSlideProjector.enabled = false;
|
mindSlideProjector.enabled = false;
|
||||||
var visionBeamEffect = SearchUtilities.FindChild(standingTorch, "VisionBeam");
|
var visionBeamEffect = SearchUtilities.FindChild(standingTorch, "VisionBeam");
|
||||||
visionBeamEffect.SetActive(false);
|
visionBeamEffect.SetActive(false);
|
||||||
|
|
||||||
//
|
//
|
||||||
// set up slides
|
// set up slides
|
||||||
@ -276,10 +276,10 @@ namespace NewHorizons.Builder.Props
|
|||||||
|
|
||||||
slideCollection.slides[i] = slide;
|
slideCollection.slides[i] = slide;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this variable just lets us track how many of the slides have been loaded.
|
// this variable just lets us track how many of the slides have been loaded.
|
||||||
// this way as soon as the last one is loaded (due to async loading, this may be
|
// this way as soon as the last one is loaded (due to async loading, this may be
|
||||||
// slide 7, or slide 3, or whatever), we can enable the vision torch. This allows us
|
// slide 7, or slide 3, or whatever), we can enable the vision torch. This allows us
|
||||||
// to avoid doing a "is every element in the array `slideCollection.slides` not null" check every time a texture finishes loading
|
// to avoid doing a "is every element in the array `slideCollection.slides` not null" check every time a texture finishes loading
|
||||||
int displaySlidesLoaded = 0;
|
int displaySlidesLoaded = 0;
|
||||||
imageLoader.imageLoadedEvent.AddListener(
|
imageLoader.imageLoadedEvent.AddListener(
|
||||||
@ -289,8 +289,8 @@ namespace NewHorizons.Builder.Props
|
|||||||
displaySlidesLoaded++; // threading moment
|
displaySlidesLoaded++; // threading moment
|
||||||
|
|
||||||
if (displaySlidesLoaded >= slides.Length)
|
if (displaySlidesLoaded >= slides.Length)
|
||||||
{
|
{
|
||||||
mindSlideProjector.enabled = true;
|
mindSlideProjector.enabled = true;
|
||||||
visionBeamEffect.SetActive(true);
|
visionBeamEffect.SetActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ namespace NewHorizons.Builder.Props
|
|||||||
// make sure that these slides play when the player wanders into the beam
|
// make sure that these slides play when the player wanders into the beam
|
||||||
// _slideCollectionItem is actually a reference to a SlideCollectionContainer. Not a slide reel item
|
// _slideCollectionItem is actually a reference to a SlideCollectionContainer. Not a slide reel item
|
||||||
mindSlideProjector._mindSlideCollection = mindSlideCollection;
|
mindSlideProjector._mindSlideCollection = mindSlideCollection;
|
||||||
mindSlideProjector._slideCollectionItem = slideCollectionContainer;
|
mindSlideProjector._slideCollectionItem = slideCollectionContainer;
|
||||||
mindSlideProjector.SetMindSlideCollection(mindSlideCollection);
|
mindSlideProjector.SetMindSlideCollection(mindSlideCollection);
|
||||||
|
|
||||||
|
|
||||||
@ -364,9 +364,9 @@ namespace NewHorizons.Builder.Props
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class VisionTorchTarget : MonoBehaviour
|
public class VisionTorchTarget : MonoBehaviour
|
||||||
{
|
{
|
||||||
public MindSlideCollection slideCollection;
|
public MindSlideCollection slideCollection;
|
||||||
public SlideCollectionContainer slideCollectionContainer;
|
public SlideCollectionContainer slideCollectionContainer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,14 +119,14 @@ namespace NewHorizons.Utility
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static GameObject FindChild(GameObject g, string childName)
|
public static GameObject FindChild(GameObject g, string childName)
|
||||||
{
|
{
|
||||||
foreach(Transform child in g.transform)
|
foreach(Transform child in g.transform)
|
||||||
{
|
{
|
||||||
if (child.gameObject.name == childName) return child.gameObject;
|
if (child.gameObject.name == childName) return child.gameObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static GameObject Find(string path)
|
public static GameObject Find(string path)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user