You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.4 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using SiegeSong;
using Gaia;
namespace SiegeSong
{
public class PlayerReferencePopulator : MonoBehaviour
{
public GameObject Instance;
public GaiaScenePlayer GaiaPlayer;
public GameObject FogDataObject;
public FogVolumePriority FogPriority;
public FogVolume FogVolume;
public GaiaGlobal GaiaGlobalSettings;
public Suimono.Core.SuimonoModule WaterModule;
void Start()
{
}
void Update()
{
}
public void PopulateReferences()
{
if (FogDataObject != null)
{
FogDataObject.GetComponent<FogVolumeData>().GameCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.GetComponentInChildren<Camera>();
}
if (FogPriority != null)
{
FogPriority.GameCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.GetComponentInChildren<Camera>();
}
if (FogVolume != null)
{
//FogVolume.FogVolumeData = FogDataObject;
FogVolume.AssignCamera();
}
if (GaiaPlayer != null)
{
GaiaPlayer.transform.parent = Instance.transform;
GaiaPlayer.transform.position = Vector3.zero;
}
if (WaterModule != null)
{
WaterModule.setTrack = Instance.transform;
WaterModule.setCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.transform.GetChild(0);
WaterModule.mainCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.transform.GetChild(0);
WaterModule.manualCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.transform.GetChild(0);
}
GaiaGlobalSettings.m_mainCamera = Instance.GetComponentInChildren<PlayerCameraManager>().ActiveCamera.GetComponentInChildren<Camera>();
}
}
}
//namespace SiegeSong
//{
// public class ZoneLoader : MonoBehaviour
// {
// public ActorLoader[] ActorLoaders;
// public ObjectLoader[] ObjectLoaders;
// public BuildingLoader[] BuildingLoaders;
// void Start()
// {
// }
// void Update()
// {
// }
// }
//}