예제 #1
0
    void Update()
    {
        if (wasAlreadyDead == true)
        {
            return;
        }

        if (PhotonNetwork.isMasterClient)
        {
            CheckSyncPosition();
            CheckSyncRotation();
        }
        else
        {
            transform.position = Vector3.Lerp(transform.position, syncPos, 0.1f);
            transform.rotation = Quaternion.Lerp(transform.rotation, syncRot, 0.1f);
        }

        // Stop chasing and set dead if it's dead
        if (!wasAlreadyDead && healthManager.IsDead)
        {
            wasAlreadyDead = true;

            SetDead();
            chasing.StopChasing();
        }
    }
    void Update()
    {
        if (wasAlreadyDead == true)
        {
            return;
        }

        // Stop chasing and set dead if it's dead
        if (!wasAlreadyDead && healthManager.IsDead)
        {
            wasAlreadyDead = true;

            SetDead();
            chasing.StopChasing();
        }
    }
예제 #3
0
    void Update()
    {
        if (wasAlreadyDead == true)
        {
            return;
        }

        // Stop chasing and set dead if it's dead
        //შეწყვეტა დევნა და მკვდარზე დაყენება თუ ის მკვდარია
        if (!wasAlreadyDead && healthManager.IsDead)
        {
            wasAlreadyDead = true;

            SetDead();
            chasing.StopChasing();
        }
    }