Commit 6136edc1 authored by czy's avatar czy

人物不够掉下场景

parent e4adaa0f
...@@ -199,7 +199,7 @@ AnimatorStateTransition: ...@@ -199,7 +199,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25 m_TransitionDuration: 0.25
m_TransitionOffset: 0 m_TransitionOffset: 0
m_ExitTime: 0.89285713 m_ExitTime: 0.89285713
m_HasExitTime: 1 m_HasExitTime: 0
m_HasFixedDuration: 1 m_HasFixedDuration: 1
m_InterruptionSource: 0 m_InterruptionSource: 0
m_OrderedInterruption: 1 m_OrderedInterruption: 1
...@@ -251,7 +251,7 @@ AnimatorStateTransition: ...@@ -251,7 +251,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.25 m_TransitionDuration: 0.25
m_TransitionOffset: 0 m_TransitionOffset: 0
m_ExitTime: 0.75 m_ExitTime: 0.75
m_HasExitTime: 1 m_HasExitTime: 0
m_HasFixedDuration: 1 m_HasFixedDuration: 1
m_InterruptionSource: 0 m_InterruptionSource: 0
m_OrderedInterruption: 1 m_OrderedInterruption: 1
...@@ -276,7 +276,7 @@ AnimatorStateTransition: ...@@ -276,7 +276,7 @@ AnimatorStateTransition:
m_TransitionDuration: 0.03374338 m_TransitionDuration: 0.03374338
m_TransitionOffset: 0 m_TransitionOffset: 0
m_ExitTime: 0.9815945 m_ExitTime: 0.9815945
m_HasExitTime: 1 m_HasExitTime: 0
m_HasFixedDuration: 1 m_HasFixedDuration: 1
m_InterruptionSource: 0 m_InterruptionSource: 0
m_OrderedInterruption: 1 m_OrderedInterruption: 1
......
This diff is collapsed.
...@@ -50,7 +50,7 @@ MeshRenderer: ...@@ -50,7 +50,7 @@ MeshRenderer:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7483224581113721909} m_GameObject: {fileID: 7483224581113721909}
m_Enabled: 1 m_Enabled: 0
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1 m_DynamicOccludee: 1
......
...@@ -50,7 +50,7 @@ MeshRenderer: ...@@ -50,7 +50,7 @@ MeshRenderer:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6039842180593449807} m_GameObject: {fileID: 6039842180593449807}
m_Enabled: 1 m_Enabled: 0
m_CastShadows: 1 m_CastShadows: 1
m_ReceiveShadows: 1 m_ReceiveShadows: 1
m_DynamicOccludee: 1 m_DynamicOccludee: 1
......
...@@ -42,12 +42,14 @@ public class BossAttack : MonoBehaviour ...@@ -42,12 +42,14 @@ public class BossAttack : MonoBehaviour
{ {
TempLegSweepObj = Instantiate(LegSweepTrigger, RightThigh); TempLegSweepObj = Instantiate(LegSweepTrigger, RightThigh);
} }
if (TempHurricaneKickObj != null) Destroy(TempHurricaneKickObj);
break; break;
case AttackType.HurricaneKick: case AttackType.HurricaneKick:
if (TempHurricaneKickObj == null) if (TempHurricaneKickObj == null)
{ {
TempHurricaneKickObj = Instantiate(HurricaneKickTrigger, LeftThigh); TempHurricaneKickObj = Instantiate(HurricaneKickTrigger, LeftThigh);
} }
if (TempLegSweepObj != null) Destroy(TempLegSweepObj);
break; break;
default: default:
Debug.LogError(attackType); Debug.LogError(attackType);
......
...@@ -12,7 +12,8 @@ public class Food : MonoBehaviour ...@@ -12,7 +12,8 @@ public class Food : MonoBehaviour
private RandomFood randomFood; private RandomFood randomFood;
private void Start() private void Start()
{ {
randomFood = transform.parent.parent.GetComponent<RandomFood>(); //randomFood = transform.parent.parent.GetComponent<RandomFood>();
} }
//private void OnTriggerEnter(Collider other) //private void OnTriggerEnter(Collider other)
...@@ -29,6 +30,18 @@ public class Food : MonoBehaviour ...@@ -29,6 +30,18 @@ public class Food : MonoBehaviour
private void Update() private void Update()
{ {
if (!BattleCtrl.instance.isStartBattle)
{
//游戏没有开始
return;
}
if (BattleCtrl.instance.isEndBattle)
{
//游戏已经结束
return;
}
if (targetObj == null) if (targetObj == null)
{ {
xDelta = 0; xDelta = 0;
...@@ -45,6 +58,7 @@ public class Food : MonoBehaviour ...@@ -45,6 +58,7 @@ public class Food : MonoBehaviour
private void OnDestroy() private void OnDestroy()
{ {
randomFood = transform.parent.parent.GetComponent<RandomFood>();
randomFood.AddFoodPos(transform.parent); randomFood.AddFoodPos(transform.parent);
} }
} }
...@@ -14,6 +14,8 @@ public class MagnetTrigger : MonoBehaviour ...@@ -14,6 +14,8 @@ public class MagnetTrigger : MonoBehaviour
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
transform.position = new Vector3(FollowTarget.position.x, transform.position.y, FollowTarget.position.z); transform.position = new Vector3(FollowTarget.position.x, transform.position.y, FollowTarget.position.z);
//transform.localScale = FollowTarget.localScale; //transform.localScale = FollowTarget.localScale;
} }
......
...@@ -240,7 +240,7 @@ public class PlayerMove : MonoBehaviour ...@@ -240,7 +240,7 @@ public class PlayerMove : MonoBehaviour
} }
if (BattleCtrl.instance.isEndBattle) if (BattleCtrl.instance.isEndBattle)
{ {
//游戏没有结束 //游戏已经结束
return; return;
} }
RaycastHit hit; RaycastHit hit;
......
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