示例#1
0
    /// <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);
        }
    }
示例#2
0
    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;
    }
示例#3
0
    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;
    }