Esempio n. 1
0
        public void InitializeLocal(int id, int controllerIndex, Camera.Viewer viewer, Bird bird, BirdTypeData birdType)
        {
            Driver.ControllerIndex = controllerIndex;
            _viewer = viewer;

            Debug.Log($"Initializing local player {id}");
            Initialize(id, bird, birdType);

            Viewer.Initialize(this);

            Viewer.FollowCamera.SetTarget(this);

            // ouch.... why not just render everything except for OtherRenderLayer ?
            Viewer.AddRenderLayer(Bird.Type.PlayerLayer);
            Viewer.AddRenderLayer(Bird.Type.OtherPlayerLayer);
            Viewer.AddRenderLayer(Bird.Type.RenderLayer);
            Viewer.RemoveRenderLayer(Bird.Type.OtherRenderLayer);
            Viewer.AddRenderLayer(GameManager.Instance.ObstacleLayer);
        }