/// <summary> /// 사망처리를 하는 함수 /// </summary> private void Dead() { InitMinionStatus(); minHP.InitProgressBar(); if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } if (TheAIDest == null) { TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); } if (TheAIPath == null) { TheAIPath = gameObject.GetComponent <AIPath>(); } minAtk.TheAIPath = null; minAtk.moveTarget = null; minAtk.nowTarget = null; minAtk.StopAllCoroutines(); TheAIPath.canMove = true; TheAIPath.canSearch = true; gameObject.SetActive(false); gameObject.GetComponent <AIDestinationSetter>().target = null; // 죽을 때 마우스 바뀐 상태면 원래대로 돌림 if (isMouseChanged) { cursor.SetCursor(cursor.PreCursor, Vector2.zero); } }
private void Dead() { //ingameManager.minionDeadCount += 1; InitMinionStatus(); minHP.InitProgressBar(); if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } if (TheAIDest == null) { TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); } if (TheAIPath == null) { TheAIPath = gameObject.GetComponent <AIPath>(); } minAtk.TheAIPath = null; minAtk.MoveTarget = null; minAtk.nowTarget = null; minAtk.StopAllCoroutines(); TheAIPath.canMove = true; TheAIPath.canSearch = true; gameObject.SetActive(false); gameObject.GetComponent <AIDestinationSetter>().target = null; // 죽을때 마우스바뀐상태면 원래대로 if (mouseChanged) { cursor.SetCursor(cursor.PreCursor, Vector2.zero); } //gameObject.transform.position = deadVec + deadOffsetVec; }
private void Dead() { //gameObject.GetComponent<GridData>().RemoveGridData(); if (minAtk == null) { minAtk = transform.GetComponentInChildren <MinionAtk>(); } if (TheAIDest == null) { TheAIDest = gameObject.GetComponent <AIDestinationSetter>(); } if (TheAIPath == null) { TheAIPath = gameObject.GetComponent <AIPath>(); } minAtk.TheAIPath = null; minAtk.MoveTarget = null; minAtk.nowTarget = null; minAtk.StopAllCoroutines(); TheAIPath.canMove = true; TheAIPath.canSearch = true; gameObject.SetActive(false); gameObject.GetComponent <AIDestinationSetter>().target = null; //gameObject.transform.position = deadVec + deadOffsetVec; }