void init() { AimCamera aimCamera = (AimCamera)GameObject.FindObjectOfType(typeof(AimCamera)); if (aimCamera) { //aimCamera.cameraOffset = aimCameraOffset; } RollCamera rollCam = (RollCamera)GameObject.FindObjectOfType(typeof(RollCamera)); if (rollCam) { /// rollCam.yOffset = rollCameraYOffset; // rollCam.zOffset = rollCameraOffset; } m_joystick = (Joystick)GameObject.FindObjectOfType(typeof(Joystick)); if (GetComponent <Rigidbody>() && GetComponent <Rigidbody>().GetComponent <Collider>()) { m_initalMaterial = GetComponent <Rigidbody>().GetComponent <Collider>().material; } //a ref to the hole transform m_holeTransform = GameObject.FindWithTag("Hole").transform; //get a ref to the golf mat transform stop(); }
public bool isNotAiming() { bool rc = false; AimCamera ac = (AimCamera)GameObject.FindObjectOfType(typeof(AimCamera)); if (ac) { rc = ac.isNotAiming(); } return(rc); }
// Use this for initialization void Start() { aimCamera = GetComponent<AimCamera>(); moveCamera = GetComponent<GameCamera>(); if(focusObject != null){ FocusTransform(focusObject); } for(int i = 0; i < (int)CameraModes.Last; i++){ ToggleCameraMode((CameraModes)i, false); } ToggleCameraMode(cameraMode, true); }