Exemplo n.º 1
0
        void Awake()
        {
            if (instance != null)
            {
                Destroy(gameObject);
                return;
            }

            instance = this;

            //ResetCamera(motor, true);
        }
Exemplo n.º 2
0
        public void BindLocalPlayer(CharacterMotor motor, Player player)
        {
            if (playerCam == null)
            {
                GameObject go = GameObject.Instantiate(playerCameraPrefab) as GameObject;
                playerCam = go.GetComponent <CameraRig>();
            }
            playerCam.ResetCamera(motor);
            sceneCamera.SetActive(false);

            playerRef             = player;
            player.onDamageEvent -= UpdateCamera;
            player.onDamageEvent += UpdateCamera;
        }