| | |
| | | public bool bInDeathState |
| | | { |
| | | get { return this.bInDeathAct; } |
| | | set { bInDeathAct = value; } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | protected bool nodeMoveUpdate = false; |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 代理的类型 |
| | | /// </summary> |
| | | public SpawnAgentType AgentType { get; set; } = SpawnAgentType.Normal; |
| | | |
| | | /// <summary> |
| | | /// Accessor to <see cref="m_NavMeshAgent"/> |
| | |
| | | { |
| | | if (this.healthVal <= 0.1) |
| | | { |
| | | // 统一管理器内删除当前的Agent: |
| | | AgentInsManager.instance.removeAgent(this); |
| | | this.Remove(); |
| | | Die(); |
| | | |
| | | //Debug.Log("删除多余的攻击Agent."); |
| | | } |
| | | } |
| | | |
| | | private void Die() |
| | | { |
| | | // 统一管理器内删除当前的Agent: |
| | | AgentInsManager.instance.removeAgent(this); |
| | | this.Remove(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (mAnim == null) |
| | | { |
| | | changeMat = GetComponent<ChangeMat>(); |
| | | changeMat?.SetSelf(this.opponentAgent,CheckHealth); |
| | | changeMat?.SetSelf(this.opponentAgent, CheckHealth,Die); |
| | | } |
| | | } |
| | | |