|
@@ -13,6 +13,8 @@ namespace GameLogic.Combat.CombatTool
|
|
|
{
|
|
|
public class CombatSenceController : IDisposable
|
|
|
{
|
|
|
+ private static readonly int Ran = Shader.PropertyToID("_ran");
|
|
|
+ private static readonly int Pos = Shader.PropertyToID("_pos");
|
|
|
public CombatSencePath currBesselPath;
|
|
|
|
|
|
public CombatSencePath NextBesselPath;
|
|
@@ -27,17 +29,18 @@ namespace GameLogic.Combat.CombatTool
|
|
|
|
|
|
private List<CombatSencePath> reclaimSence = new List<CombatSencePath>();
|
|
|
|
|
|
- protected GameObjectPool ShengShiQiuTi;
|
|
|
+ // protected GameObjectPool ShengShiQiuTi;
|
|
|
|
|
|
private float shengShiStartSize = 3;
|
|
|
private float shengShiEndSize = 300;
|
|
|
- private float _shengShiAddTime;
|
|
|
+ // private float _shengShiAddTime;
|
|
|
private bool _isUpdateShengShi;
|
|
|
|
|
|
private SceneMonoConfig SceneMonoConfig;
|
|
|
|
|
|
private RandomAllMap RandomAllMap;
|
|
|
|
|
|
+ private float shengShiRan;
|
|
|
// private List
|
|
|
public async CTask InitScenes()
|
|
|
{
|
|
@@ -51,13 +54,14 @@ namespace GameLogic.Combat.CombatTool
|
|
|
{
|
|
|
GameObject gameObject = assetHandle.AssetObject<GameObject>();
|
|
|
SceneMonoConfig = gameObject.GetComponent<SceneMonoConfig>();
|
|
|
+ SceneMonoConfig.shengShiMaterial.SetFloat(Ran,0.1f);
|
|
|
});
|
|
|
cTaskAwaitBuffer.AddTask(task_a);
|
|
|
|
|
|
- ShengShiQiuTi =
|
|
|
- await GObjectPool.Instance.FetchAsync<GameObjectPool>("ShengShiQiuTi", null, null, false,
|
|
|
- "ShengShiQiuTi");
|
|
|
- ShengShiQiuTi.SetActive(false);
|
|
|
+ // ShengShiQiuTi =
|
|
|
+ // await GObjectPool.Instance.FetchAsync<GameObjectPool>("ShengShiQiuTi", null, null, false,
|
|
|
+ // "ShengShiQiuTi");
|
|
|
+ // ShengShiQiuTi.SetActive(false);
|
|
|
lasetDir = Vector3.forward;
|
|
|
lasetPos = new Vector3(0, 20, 0);
|
|
|
await cTaskAwaitBuffer.WaitAll();
|
|
@@ -291,12 +295,16 @@ namespace GameLogic.Combat.CombatTool
|
|
|
|
|
|
public void StartPayShengShi(Transform root)
|
|
|
{
|
|
|
- ShengShiQiuTi.own.transform.SetParent(root);
|
|
|
- ShengShiQiuTi.own.transform.localPosition = Vector3.zero;
|
|
|
- ShengShiQiuTi.SetActive(true);
|
|
|
+ shengShiRan = 1;
|
|
|
+ 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);
|
|
|
+
|
|
|
_isUpdateShengShi = true;
|
|
|
- ShengShiQiuTi.own.transform.localScale = Vector3.one * shengShiStartSize;
|
|
|
- _shengShiAddTime = 0;
|
|
|
+
|
|
|
+ // _shengShiAddTime = 0;
|
|
|
}
|
|
|
|
|
|
public void Update(float t)
|
|
@@ -319,12 +327,15 @@ namespace GameLogic.Combat.CombatTool
|
|
|
|
|
|
if (_isUpdateShengShi)
|
|
|
{
|
|
|
- _shengShiAddTime += t * 1f;
|
|
|
- float v = Mathf.Lerp(shengShiStartSize, shengShiEndSize, _shengShiAddTime);
|
|
|
- ShengShiQiuTi.own.transform.localScale = Vector3.one * v;
|
|
|
- if (_shengShiAddTime >= 1)
|
|
|
+ // _shengShiAddTime += t * 1f;
|
|
|
+ shengShiRan += t * 150;
|
|
|
+ SceneMonoConfig.shengShiMaterial.SetFloat(Ran,shengShiRan);
|
|
|
+ // float v = Mathf.Lerp(shengShiStartSize, shengShiEndSize, _shengShiAddTime);
|
|
|
+ // ShengShiQiuTi.own.transform.localScale = Vector3.one * v;
|
|
|
+ if (shengShiRan >= 180)
|
|
|
{
|
|
|
- ShengShiQiuTi.SetActive(false);
|
|
|
+ SceneMonoConfig.shengShiMaterial.SetFloat(Ran,0.1f);
|
|
|
+
|
|
|
_isUpdateShengShi = false;
|
|
|
}
|
|
|
}
|