|
@@ -15,9 +15,9 @@ namespace GameLogic.Combat.CombatTool
|
|
|
{
|
|
|
public class CombatSenceController : IDisposable
|
|
|
{
|
|
|
- private static readonly int Ran = Shader.PropertyToID("_ran");
|
|
|
+ private static readonly int Ran = Shader.PropertyToID("_shengshiRan");
|
|
|
|
|
|
- private static readonly int Pos = Shader.PropertyToID("_pos");
|
|
|
+ private static readonly int Pos = Shader.PropertyToID("_shengShiPos");
|
|
|
// public CombatSencePath currBesselPath;
|
|
|
//
|
|
|
// public CombatSencePath NextBesselPath;
|
|
@@ -106,7 +106,8 @@ namespace GameLogic.Combat.CombatTool
|
|
|
{
|
|
|
GameObject gameObject = assetHandle.AssetObject<GameObject>();
|
|
|
SceneMonoConfig = gameObject.GetComponent<SceneMonoConfigBasic>();
|
|
|
- SceneMonoConfig.shengShiMaterial.SetFloat(Ran, 0.1f);
|
|
|
+ Shader.SetGlobalFloat(Ran, 0.1f);
|
|
|
+ // SceneMonoConfig.shengShiMaterial.SetFloat(Ran, 0.1f);
|
|
|
});
|
|
|
cTaskAwaitBuffer.AddTask(task_a);
|
|
|
|
|
@@ -176,11 +177,13 @@ namespace GameLogic.Combat.CombatTool
|
|
|
public void StartPayShengShi(Transform root)
|
|
|
{
|
|
|
shengShiRan = 1;
|
|
|
- SceneMonoConfig.shengShiMaterial.SetFloat(Ran, shengShiRan);
|
|
|
+ Shader.SetGlobalFloat(Ran, shengShiRan);
|
|
|
+ // SceneMonoConfig.shengShiMaterial.SetFloat(Ran, shengShiRan);
|
|
|
Vector3 pos = CombatController.currActiveCombat.playerHeroEntity.dotPos - CombatController.currActiveCombat
|
|
|
.CombatCameraControllder.Camera.transform.position;
|
|
|
pos.z = -30;
|
|
|
- SceneMonoConfig.shengShiMaterial.SetVector(Pos, pos);
|
|
|
+ Shader.SetGlobalVector(Pos, pos);
|
|
|
+ // SceneMonoConfig.shengShiMaterial.SetVector(Pos, pos);
|
|
|
|
|
|
_isUpdateShengShi = true;
|
|
|
|
|
@@ -198,12 +201,14 @@ namespace GameLogic.Combat.CombatTool
|
|
|
{
|
|
|
// _shengShiAddTime += t * 1f;
|
|
|
shengShiRan += t * 150;
|
|
|
- SceneMonoConfig.shengShiMaterial.SetFloat(Ran, shengShiRan);
|
|
|
+ Shader.SetGlobalFloat(Ran, shengShiRan);
|
|
|
+ // SceneMonoConfig.shengShiMaterial.SetFloat(Ran, shengShiRan);
|
|
|
// float v = Mathf.Lerp(shengShiStartSize, shengShiEndSize, _shengShiAddTime);
|
|
|
// ShengShiQiuTi.own.transform.localScale = Vector3.one * v;
|
|
|
if (shengShiRan >= 200)
|
|
|
{
|
|
|
- SceneMonoConfig.shengShiMaterial.SetFloat(Ran, 0.1f);
|
|
|
+ Shader.SetGlobalFloat(Ran, 0.1f);
|
|
|
+ // SceneMonoConfig.shengShiMaterial.SetFloat(Ran, 0.1f);
|
|
|
|
|
|
_isUpdateShengShi = false;
|
|
|
}
|