コード例 #1
0
    private void Dead()
    {
        if (icon != null)
        {
            icon.gameObject.SetActive(false);
        }
        ChampionSound.instance.IamDeadSound(myChampionData.ChampionName);
        // 죽은애가 나면 데스올려라, 그리고 죽는 더미 생성
        InitChampionStatus();
        ChampHP.InitProgressBar();
        if (GetComponent <PhotonView>().owner.Equals(PhotonNetwork.player))
        {
            myChampionData.death++;
            myChampionData.UIRightTop.AllUpdate();

            string dummyName = gameObject.name.Split('_')[0];
            // 더미생성
            PhotonNetwork.Instantiate("Champion/" + dummyName + "Die", transform.position, transform.rotation, 0);

            reviveTime = (myChampionData.totalstat.Level - 1) * 2.0f + 10.0f;
            myChampionData.UIIcon.ReviveCoverImage.enabled = true;

            if (deadEffect == null)
            {
                deadEffect = Camera.main.GetComponentInChildren <DeadEffect>();
            }
            deadEffect.TurnOn();

            // 죽으면 상점 구매가능
            PlayerData.Instance.purchaseState = true;

            // 내가가진 어시리스트애들한테 어시올려줌
            assistRPC();
        }

        myChampAtk.StopAllCoroutines();
        myChampAtk.ResetTarget();

        // 죽으면 기존에 액티브끄는 대신에 좌표를 옮겨버림.
        //gameObject.SetActive(false);
        transform.position = new Vector3(transform.position.x, -100, transform.position.z);

        // 죽을때 마우스바뀐상태면 원래대로
        if (mouseChanged)
        {
            cursor.SetCursor(cursor.PreCursor, Vector2.zero);
        }

        //var myAstarTarget = transform.parent.Find("PlayerA*Target");
        //if (myAstarTarget != null)
        //    myAstarTarget.localPosition = startPos;
    }
コード例 #2
0
    /// <summary>
    /// 사망처리를 하는 함수
    /// </summary>
    private void Dead()
    {
        if (icon != null)
        {
            icon.gameObject.SetActive(false);
        }

        // 플레이어 본인이 죽은 경우 데스 수치를 올리고 죽는 더미를 생성한다
        ChampionSound.instance.IamDeadSound(myChampionData.championName);
        InitChampionStatus();
        champHP.InitProgressBar();

        if (GetComponent <PhotonView>().owner.Equals(PhotonNetwork.player))
        {
            myChampionData.death++;

            // 더미생성
            string dummyName = gameObject.name.Split('_')[0];
            PhotonNetwork.Instantiate("Champion/" + dummyName + "Die", transform.position, transform.rotation, 0);

            reviveTime = (myChampionData.totalStat.Level - 1) * 2.0f + 10.0f;
            myChampionData.UIIcon.reviveCoverImage.enabled = true;

            if (deadEffect == null)
            {
                deadEffect = Camera.main.GetComponentInChildren <DeadEffect>();
            }

            deadEffect.TurnOn();

            // 사망 시 상점 이용이 가능하게 처리한다
            PlayerData.Instance.purchaseState = true;

            // 나를 죽인 이들의 어시스트를 올린다
            AssistRPC();
        }

        myChampAtk.StopAllCoroutines();
        myChampAtk.ResetTarget();

        // 사망시 활성을 끄는 대신 좌표를 옮겨버린다
        transform.position = new Vector3(transform.position.x, -100, transform.position.z);

        // 사망시 마우스 커서가 바뀌어있다면 원상복귀 시킨다
        if (isMouseChanged)
        {
            cursor.SetCursor(cursor.PreCursor, Vector2.zero);
        }
    }
コード例 #3
0
ファイル: ChampionBehavior.cs プロジェクト: papamoomin/AOS
 private void Dead()
 {
     myChampAtk.StopAllCoroutines();
     myChampAtk.ResetTarget();
     gameObject.SetActive(false);
 }