started building NPC combat

This commit is contained in:
2026-09-29 16:11:54 +01:00
parent be2e7a5824
commit 7486c8d310
4952 changed files with 1093899 additions and 745 deletions

View File

@@ -0,0 +1,28 @@
/// Credit SimonDarksideJ
/// Updated by Synty: Renamed Unity.UI.Extensions to Synty.Interface.Extensions to avoid conflicts with Unity Ui Extensions and to pass Unity asset store submission.
using System.Collections.Generic;
using UnityEngine;
namespace Synty.Interface.Extensions
{
public static class ShaderLibrary
{
public static Dictionary<string, Shader> shaderInstances = new Dictionary<string, Shader>();
public static Shader[] preLoadedShaders;
public static Shader GetShaderInstance(string shaderName)
{
if (shaderInstances.ContainsKey(shaderName))
{
return shaderInstances[shaderName];
}
var newInstance = Shader.Find(shaderName);
if (newInstance != null)
{
shaderInstances.Add(shaderName, newInstance);
}
return newInstance;
}
}
}