// Start is called before the first frame update void Start() { myGlobal = GameObject.Find("Global").GetComponent <Global>(); myPlayer = GameObject.Find("Player"); myCharController = myPlayer.GetComponent <CharacterController>(); //possessionCameraObj = GameObject.Find("possessionCamera"); mainCam = GameObject.Find("Camera").GetComponent <Camera>(); //possessionCam = possessionCameraObj.GetComponent<Camera>(); //possessionCameraObj.SetActive(false); myController = gameObject.GetComponent <Controller>(); myHauntActions = gameObject.GetComponent <HauntActions>(); dynamicButtonUpdaterScript = gameObject.GetComponent <DynamicButtonUpdater>(); }
// Start is called before the first frame update private void Awake() { start = false; decalOpen = false; decalStates = new bool[4] { true, false, true, false }; global = GameObject.Find("Global").GetComponent <Global>(); // Shared pointer. player = GameObject.Find("Player"); camera = GameObject.Find("Camera"); cameraComponent = camera.GetComponent <Camera>(); possessCam = GameObject.Find("possessionCamera"); possessCamComponent = camera.GetComponent <Camera>(); characterController = player.GetComponent <CharacterController>(); dynamicButtonUpdaterScript = gameObject.GetComponent <DynamicButtonUpdater>(); myDecalActions = gameObject.GetComponent <DecalActions>(); myHauntActions = gameObject.GetComponent <HauntActions>(); myHauntScript = gameObject.GetComponent <Haunt>(); Platform(); placeDecalScript = placeableDecal.GetComponent <placeDecal>(); //lockMouse(); cameraRotation = new Vector3(0.0f, 0.0f, 0.0f); possessCamRotation = new Vector3(0.0f, 0.0f, 0.0f); startPosition = new Vector2(0.0f, 0.0f); deltaPosition = new Vector2(0.0f, 0.0f); endPosition = new Vector2(0.0f, 0.0f); looking = false; //walkSlider = GameObject.Find("GUI/Debugger/Move Slider").GetComponent<Slider>(); //lookSlider = GameObject.Find("GUI/Debugger/Look Slider").GetComponent<Slider>(); walkSpeed = 10; lookSpeed = 5; //ActionWheelToggle = GameObject.Find("GUI/Debugger/Action Wheel Toggle").GetComponent<Toggle>(); }