Ejemplo n.º 1
0
    // Update is called once per frame
    new void Update()
    {
        if (gpc == null)
        {
            if (GlobalPlayerController.localInstance != null)
            {
                gpc = GlobalPlayerController.localInstance;
                gpc.DisableAllControls();
                gpc.enabled = false;
                localAnimatorCutscene.Play();
            }
            else
            {
                //This should not move until the player exists
                return;
            }
        }

        base.Update();

        if (gameState == GameState.PLAYING)
        {
            timerSeconds += Time.deltaTime;
        }

        if (gameState == GameState.ENDED)
        {
            gpc.DisableAllControls();
            gpc.enabled = false;
        }
    }
Ejemplo n.º 2
0
    public void RpcClientDeactivatePlayer(NetworkIdentity player)
    {
        GlobalPlayerController gpc = player.GetComponent <GlobalPlayerController>();

        gpc.DisableAllControls();
        gpc.enabled = false;
    }
Ejemplo n.º 3
0
    public void RpcDie()
    {
        HandleRagdoll();
        gpc.DisableAllControls();
        gpc.enabled = false;
        wpc.wallsCollidingWith.Clear();

        model.SetActive(false);

        rb.useGravity           = false;
        capsuleCollider.enabled = false;
    }
Ejemplo n.º 4
0
 public void DeactivatePlayer(GlobalPlayerController player)
 {
     player.DisableAllControls();
     player.enabled = false;
     RpcClientDeactivatePlayer(player.GetComponent <NetworkIdentity>());
 }