| | |
| | | protected bool bInDeathAct = false; |
| | | |
| | | /// <summary> |
| | | /// 原地罚站 |
| | | /// </summary> |
| | | /// <param name="can"></param> |
| | | public bool CanMove { get; set; } = true; |
| | | |
| | | /// <summary> |
| | | /// Gets the attached nav mesh agent velocity |
| | | /// </summary> |
| | | public override Vector3 velocity |
| | |
| | | poisonTimes = 0; |
| | | timeToPoisonHurt = 0; |
| | | bShieldBreak = false; |
| | | CanMove = true; |
| | | |
| | | /*// 如果对应的粒子不为空,则播放 |
| | | if( spawnParticle) |
| | |
| | | if (MoveStopEffect) |
| | | return; |
| | | |
| | | MoveStopEffect = Instantiate(WaveLineSelMgr.instance.bufStopMovePrefab); |
| | | GameObject obj = Instantiate(WaveLineSelMgr.instance.bufStopMovePrefab); |
| | | MoveStopEffect = obj.GetComponent<ParticleSystem>(); |
| | | |
| | | if (MoveStopEffect == null) |
| | | MoveStopEffect = obj.transform.GetChild(0).GetComponent<ParticleSystem>(); |
| | | MoveStopEffect.transform.position = this.position; |
| | | MoveStopEffect.Play(); |
| | | } |
| | |
| | | if (MoveStopEffect) |
| | | return; |
| | | |
| | | MoveStopEffect = Instantiate(EndlessWaveLineManager.instance.bufStopMovePrefab); |
| | | GameObject obj = Instantiate(EndlessWaveLineManager.instance.bufStopMovePrefab); |
| | | MoveStopEffect = obj.GetComponent<ParticleSystem>(); |
| | | |
| | | if (MoveStopEffect == null) |
| | | MoveStopEffect = obj.transform.GetChild(0).GetComponent<ParticleSystem>(); |
| | | MoveStopEffect.transform.position = this.position; |
| | | MoveStopEffect.Play(); |
| | | } |
| | |
| | | this.UpdateAction(); |
| | | |
| | | // 处理死亡状态了,不必再移动: |
| | | if (bInDeathAct) return; |
| | | if (bInDeathAct || !CanMove) return; |
| | | |
| | | m_Destination = initNode.GetNextNode(); |
| | | updateAgentPos(Time.deltaTime); |