add project files
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ambiance
|
||||
{
|
||||
[CreateAssetMenu(fileName = "AmbianceDef", menuName = "GameSqueleton/New Ambiance Def")]
|
||||
public class AmbianceDef : ScriptableObject
|
||||
{
|
||||
public Sprite thumb;
|
||||
|
||||
public FogDistance fogDistance;
|
||||
|
||||
[Header("Skybox")]
|
||||
public Texture skyPano;
|
||||
|
||||
public Color fogColor;
|
||||
|
||||
[Header("Special Color")]
|
||||
public List<SpecialColorDef> specialColors;
|
||||
|
||||
[Header("Special Prefabs")]
|
||||
public List<SpecialPrefabDef> specialPrefabs;
|
||||
|
||||
[Header("Show elements")]
|
||||
public List<string> showElementsIds;
|
||||
|
||||
[Header("Hide elements")]
|
||||
public List<string> hiddenElementsIds;
|
||||
|
||||
[Header("FIRE")]
|
||||
public AmbianceDef fireAmbiance;
|
||||
|
||||
[ContextMenu("Try default")]
|
||||
private void Try()
|
||||
{
|
||||
AmbianceController.Instance.TryAmbiance(this, onFire: false);
|
||||
}
|
||||
|
||||
[ContextMenu("Try on fire")]
|
||||
private void TryFire()
|
||||
{
|
||||
AmbianceController.Instance.TryAmbiance(this, onFire: true);
|
||||
}
|
||||
|
||||
public SpecialColorDef GetSpecialColor(string id)
|
||||
{
|
||||
return specialColors.Find((SpecialColorDef c) => c.id == id);
|
||||
}
|
||||
|
||||
public SpecialPrefabDef GetSpecialPrefab(string id)
|
||||
{
|
||||
return specialPrefabs.Find((SpecialPrefabDef p) => p.id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user