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.
122 lines
3.6 KiB
C#
122 lines
3.6 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using SiegeSong;
|
|
|
|
namespace SiegeSong
|
|
{
|
|
public class LoadingPlate : MonoBehaviour
|
|
{
|
|
public string LocationName;
|
|
public LoadZoneClassification LoadClass;
|
|
public int FloorLevel = 1;
|
|
public bool Interior;
|
|
public bool Dangerous;
|
|
public bool Public;
|
|
public int OwnerActorID = -1;
|
|
|
|
public int LoadScore;
|
|
|
|
#region Objects
|
|
|
|
public int InteriorObjectsLoadScoreThreshhold = 95;
|
|
public GameObject[] InteriorObjects;
|
|
|
|
public int InteriorArchitectureLoadScoreThreshhold = 90;
|
|
public GameObject[] InteriorArchitecture;
|
|
|
|
public int PhysicsObjectsLoadScoreThreshhold = 85;
|
|
public GameObject[] PhysicsObjects;
|
|
|
|
public int AnimatedObjectsLoadScoreThreshhold = 75;
|
|
public GameObject[] AnimatedObjects;
|
|
|
|
public int StaticObjectsLoadScoreThreshhold = 65;
|
|
public GameObject[] StaticObjects;
|
|
|
|
public int DetailArchitectureLoadScoreThreshhold = 50;
|
|
public GameObject[] DetailArchitecture;
|
|
|
|
public int ExteriorArchitectureLoadScoreThreshhold = 35;
|
|
public GameObject[] ExteriorArchitecture;
|
|
|
|
public int StructuralArchitectureLoadScoreThreshhold = 25;
|
|
public GameObject[] StructuralArchitecture;
|
|
|
|
public int FoundationalArchitectureLoadScoreThreshhold = 15;
|
|
public GameObject[] FoundationalArchitecture;
|
|
|
|
#endregion
|
|
|
|
public void LoadObjects(GameObject[] objects, bool unload = false)
|
|
{
|
|
for (var i = 0; i < objects.Length; i++)
|
|
{
|
|
var objectToLoad = objects[i];
|
|
objectToLoad.active = !unload;
|
|
}
|
|
}
|
|
|
|
public void ReceiveUpdatedLoadScore(int loadScore)
|
|
{
|
|
LoadScore = loadScore;
|
|
|
|
if (loadScore > InteriorObjectsLoadScoreThreshhold)
|
|
LoadObjects(InteriorObjects);
|
|
else
|
|
LoadObjects(InteriorObjects, true);
|
|
|
|
if (loadScore > InteriorArchitectureLoadScoreThreshhold)
|
|
LoadObjects(InteriorArchitecture);
|
|
else
|
|
LoadObjects(InteriorArchitecture, true);
|
|
|
|
if (loadScore > PhysicsObjectsLoadScoreThreshhold)
|
|
LoadObjects(PhysicsObjects);
|
|
else
|
|
LoadObjects(PhysicsObjects, true);
|
|
|
|
if (loadScore > AnimatedObjectsLoadScoreThreshhold)
|
|
LoadObjects(AnimatedObjects);
|
|
else
|
|
LoadObjects(AnimatedObjects, true);
|
|
|
|
if (loadScore > StaticObjectsLoadScoreThreshhold)
|
|
LoadObjects(StaticObjects);
|
|
else
|
|
LoadObjects(StaticObjects, true);
|
|
|
|
if (loadScore > DetailArchitectureLoadScoreThreshhold)
|
|
LoadObjects(DetailArchitecture);
|
|
else
|
|
LoadObjects(DetailArchitecture, true);
|
|
|
|
if (loadScore > ExteriorArchitectureLoadScoreThreshhold)
|
|
LoadObjects(ExteriorArchitecture);
|
|
else
|
|
LoadObjects(ExteriorArchitecture, true);
|
|
|
|
if (loadScore > StructuralArchitectureLoadScoreThreshhold)
|
|
LoadObjects(StructuralArchitecture);
|
|
else
|
|
LoadObjects(StructuralArchitecture, true);
|
|
|
|
if (loadScore > FoundationalArchitectureLoadScoreThreshhold)
|
|
LoadObjects(FoundationalArchitecture);
|
|
else
|
|
LoadObjects(FoundationalArchitecture, true);
|
|
}
|
|
|
|
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|