private void Awake() { myButtonUpdater = gameObject.GetComponent <DynamicButtonUpdater>(); characterController = player.GetComponent <CharacterController>(); playerDirection = new Vector3(0.0f, 0.0f, 0.0f); cameraRotation = camera.transform.eulerAngles; }
void Awake() { distorted = false; npcDetected = false; timeHolder = 0; isSnapped = false; global = GameObject.Find("Global").GetComponent <Global>(); decalTransform = gameObject.GetComponent <Transform>(); myButtonUpdater = GameObject.Find("Player").GetComponent <DynamicButtonUpdater>(); }
private void Start() { buttonUpdater = GameObject.Find("Player").GetComponent <DynamicButtonUpdater>(); audio = gameObject.GetComponent <AudioSource>(); myAnim = gameObject.GetComponent <Animator>(); global = GameObject.Find("Global").GetComponent <Global>(); myActionNames = new string[] { "Open", "Smoke", "...", "..." }; myHaunt = GameObject.Find("Player").GetComponent <Haunt>(); states = new bool[4] { true, true, false, false }; }
// Start is called before the first frame update void Start() { GUI.GetComponent <GUI>().ShowOverlays(false); UISprites = GUI.GetComponentsInChildren <Image>(); GUI.GetComponent <GUI>().ShowOverlays(true); GUI.GetComponent <GUI>().SetOverlays(); myController = gameObject.GetComponent <Controller2>(); actions = gameObject.GetComponent <Actions>(); global = myController.global; cameraComponent = myController.camera.GetComponent <Camera>(); dynamicButtonUpdaterScript = gameObject.GetComponent <DynamicButtonUpdater>(); }
// 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>(); }