public static void CameraController(GameObject GO, bool isLocalPlayer, GameJamColors color) { GameJamCharacterCameraController aux = null; aux = GO.GetComponent<GameJamCharacterCameraController>(); if (!aux) aux = GO.gameObject.AddComponent<GameJamCharacterCameraController>(); aux.Init(isLocalPlayer, color); }
public void Init(bool isLocalPlayer, GameJamColors color) { thisCamera = this.GetComponentInChildren<Camera>(); thisCamera.enabled = isLocalPlayer; if (isLocalPlayer) { } else { } }
void setLayerInCamera(GameJamColors color) { thisCamera.cullingMask = color.AllButThisCullingMask(); }
public void Init() { setUp = this.GetComponent<GameJamCharacterSetUp>(); color = setUp.gjColor; setLayerInCamera(color); }