Commit 30342a2a authored by wanqing's avatar wanqing

修改流体旋转

parent dd83a013
This diff is collapsed.
...@@ -698,6 +698,14 @@ public class BattleUI : MonoBehaviour ...@@ -698,6 +698,14 @@ public class BattleUI : MonoBehaviour
if(num == 1) if(num == 1)
{ {
m_combo1EffectObj = PoolManager.Instance.GetObjectFromPool(CacheManager.Instance.cmobo1EffectObj); m_combo1EffectObj = PoolManager.Instance.GetObjectFromPool(CacheManager.Instance.cmobo1EffectObj);
if(BattleCtrl.instance.levelManager.CurLevelIndex == LevelEnum.levelOneIndex)
{
m_combo1EffectObj.transform.localScale = Vector3.one * 1.5f;
}
else
{
m_combo1EffectObj.transform.localScale = Vector3.one;
}
GameServices.timerServices.Push(this, 1.0f, delegate GameServices.timerServices.Push(this, 1.0f, delegate
{ {
PoolManager.Instance.ReturnObjectToPool(m_combo1EffectObj); PoolManager.Instance.ReturnObjectToPool(m_combo1EffectObj);
...@@ -706,6 +714,14 @@ public class BattleUI : MonoBehaviour ...@@ -706,6 +714,14 @@ public class BattleUI : MonoBehaviour
else if(num == 2) else if(num == 2)
{ {
m_combo2EffectObj = PoolManager.Instance.GetObjectFromPool(CacheManager.Instance.cmobo2EffectObj); m_combo2EffectObj = PoolManager.Instance.GetObjectFromPool(CacheManager.Instance.cmobo2EffectObj);
if (BattleCtrl.instance.levelManager.CurLevelIndex == LevelEnum.levelOneIndex)
{
m_combo2EffectObj.transform.localScale = Vector3.one * 1.5f;
}
else
{
m_combo2EffectObj.transform.localScale = Vector3.one;
}
GameServices.timerServices.Push(this, 1.0f, delegate GameServices.timerServices.Push(this, 1.0f, delegate
{ {
PoolManager.Instance.ReturnObjectToPool(m_combo2EffectObj); PoolManager.Instance.ReturnObjectToPool(m_combo2EffectObj);
...@@ -714,6 +730,14 @@ public class BattleUI : MonoBehaviour ...@@ -714,6 +730,14 @@ public class BattleUI : MonoBehaviour
else else
{ {
m_combo3EffectObj = PoolManager.Instance.GetObjectFromPool(CacheManager.Instance.cmobo3EffectObj); m_combo3EffectObj = PoolManager.Instance.GetObjectFromPool(CacheManager.Instance.cmobo3EffectObj);
if (BattleCtrl.instance.levelManager.CurLevelIndex == LevelEnum.levelOneIndex)
{
m_combo3EffectObj.transform.localScale = Vector3.one * 1.5f;
}
else
{
m_combo3EffectObj.transform.localScale = Vector3.one;
}
GameServices.timerServices.Push(this, 1.0f, delegate GameServices.timerServices.Push(this, 1.0f, delegate
{ {
PoolManager.Instance.ReturnObjectToPool(m_combo3EffectObj); PoolManager.Instance.ReturnObjectToPool(m_combo3EffectObj);
......
...@@ -3,6 +3,7 @@ using System.Collections.Generic; ...@@ -3,6 +3,7 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnitySimpleLiquid; using UnitySimpleLiquid;
using Water2D; using Water2D;
using DG.Tweening;
public class FruitView : MonoBehaviour public class FruitView : MonoBehaviour
{ {
...@@ -51,6 +52,7 @@ public class FruitView : MonoBehaviour ...@@ -51,6 +52,7 @@ public class FruitView : MonoBehaviour
//小球处理 //小球处理
private List<GameObject> m_smallBallLst = new List<GameObject>(); private List<GameObject> m_smallBallLst = new List<GameObject>();
private List<Vector3> m_smallBallPosLst = new List<Vector3>(); private List<Vector3> m_smallBallPosLst = new List<Vector3>();
private float m_fruitSpeed = 0.0f;
private void Awake() private void Awake()
{ {
//if (m_animator) //if (m_animator)
...@@ -303,6 +305,9 @@ public class FruitView : MonoBehaviour ...@@ -303,6 +305,9 @@ public class FruitView : MonoBehaviour
if (varWater) if (varWater)
{ {
varWater.Spawn(); varWater.Spawn();
//varWater.transform.DORotateQuaternion(Quaternion.Euler(0, 0, 180), 0.1f).onComplete = delegate () {
// varWater.transform.DORotateQuaternion(Quaternion.Euler(0, 0, 0), 0.1f);
//};
} }
m_waterEffect.Add(varWaterEffect); m_waterEffect.Add(varWaterEffect);
} }
...@@ -315,13 +320,15 @@ public class FruitView : MonoBehaviour ...@@ -315,13 +320,15 @@ public class FruitView : MonoBehaviour
varVec.x += m_waterLemonLst[i].position.x; varVec.x += m_waterLemonLst[i].position.x;
varVec.y += m_waterLemonLst[i].position.y; varVec.y += m_waterLemonLst[i].position.y;
} }
varVec.x /= 2;
varVec.y /= 2;
if (varVec.x < 0) if (varVec.x < 0)
{ {
varVec.x -= 1.0f; varVec.x -= 0.5f;
} }
else else
{ {
varVec.x += 1.0f; varVec.x += 0.5f;
} }
varVec.y += 1.0f; varVec.y += 1.0f;
GameObject varWaterEffect = null; GameObject varWaterEffect = null;
...@@ -354,13 +361,15 @@ public class FruitView : MonoBehaviour ...@@ -354,13 +361,15 @@ public class FruitView : MonoBehaviour
varVec.x += m_waterOrangeLst[i].position.x; varVec.x += m_waterOrangeLst[i].position.x;
varVec.y += m_waterOrangeLst[i].position.y; varVec.y += m_waterOrangeLst[i].position.y;
} }
varVec.x /= 2;
varVec.y /= 2;
if (varVec.x < 0) if (varVec.x < 0)
{ {
varVec.x -= 1.0f; varVec.x -= 0.5f;
} }
else else
{ {
varVec.x += 1.0f; varVec.x += 0.5f;
} }
varVec.y += 1.0f; varVec.y += 1.0f;
GameObject varWaterEffect = null; GameObject varWaterEffect = null;
...@@ -381,6 +390,7 @@ public class FruitView : MonoBehaviour ...@@ -381,6 +390,7 @@ public class FruitView : MonoBehaviour
if (varWater) if (varWater)
{ {
varWater.Spawn(); varWater.Spawn();
varWater.transform.DORotateQuaternion(Quaternion.Euler(0, 0, varWater.transform.localEulerAngles.z - 1), 0.2f);
} }
m_waterEffect.Add(varWaterEffect); m_waterEffect.Add(varWaterEffect);
} }
...@@ -1141,6 +1151,10 @@ public class FruitView : MonoBehaviour ...@@ -1141,6 +1151,10 @@ public class FruitView : MonoBehaviour
Clicked(); Clicked();
} }
UpdateSelectSize(); UpdateSelectSize();
for(int i = 0;i< m_waterEffect.Count;i++)
{
m_waterEffect[i].transform.Rotate(Vector3.forward*20.0f, Space.World);
}
} }
//旋转叶片 //旋转叶片
void UpdateCutRotate() void UpdateCutRotate()
......
...@@ -676,7 +676,7 @@ Transform: ...@@ -676,7 +676,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2063074336016264972} m_GameObject: {fileID: 2063074336016264972}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.076, z: 0.2} m_LocalPosition: {x: 0, y: -0.06, z: 0.2}
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3} m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
m_Children: m_Children:
- {fileID: 2185915468272480620} - {fileID: 2185915468272480620}
...@@ -2974,7 +2974,7 @@ Transform: ...@@ -2974,7 +2974,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2419814894246947240} m_GameObject: {fileID: 2419814894246947240}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -2.2703242, z: 0.602708} m_LocalPosition: {x: 0, y: -2.24, z: -0.29}
m_LocalScale: {x: 3.2337003, y: 1.1207, z: 2.592764} m_LocalScale: {x: 3.2337003, y: 1.1207, z: 2.592764}
m_Children: [] m_Children: []
m_Father: {fileID: 2419814894139061657} m_Father: {fileID: 2419814894139061657}
...@@ -10683,7 +10683,7 @@ GameObject: ...@@ -10683,7 +10683,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!4 &3630512415720678602 --- !u!4 &3630512415720678602
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -11330,7 +11330,7 @@ Transform: ...@@ -11330,7 +11330,7 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6079020160306596385} m_GameObject: {fileID: 6079020160306596385}
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.28, z: 0} m_LocalPosition: {x: 0, y: 0.28, z: -5}
m_LocalScale: {x: 1, y: 0, z: 1} m_LocalScale: {x: 1, y: 0, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 3097028441198796063} m_Father: {fileID: 3097028441198796063}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment