// Use this for initialization void Start() { hudElementName = "bomb"; hudColorController = GameObject.FindGameObjectWithTag("GameController").GetComponent<HUDColorController>(); detachScript = bomb.GetComponent<BombDetach>(); timerTextCanavas = GetComponent<Canvas>(); timerText = GetComponentInChildren<Text>(); timerText.color = hudColorController.getColorByString(hudElementName); timerTextCanavas.enabled = false; }
void Start() { bd = GameObject.FindGameObjectWithTag("Bomb").GetComponent<BombDetach>(); }
// Use this for initialization void Start() { hpInternal = hitPoints; bd = GameObject.FindGameObjectWithTag("Bomb").GetComponent<BombDetach>(); }
// Use this for initialization void Start() { bd = GameObject.FindGameObjectWithTag("Bomb").GetComponent<BombDetach>(); thisTransformCache = transform; fadeDistance = defaultDistance * 0.5f; mode = CameraMode.ThirdPerson; firstPersonPosition = new Vector3(0, 0, 0); thirdPersonPosition = new Vector3(defaultSide, defaultHeight, defaultDistance); //Cursor.visible = false; // comment and uncomment this based on current needs targetDistance = currentDistance = defaultDistance; targetHeight = currentHeight = defaultHeight; //targetSide = currentSide = defaultSide; target = GameObject.FindGameObjectWithTag("Player"); //positionTarget = target.GetComponent<Rigidbody>(); lookAtTarget = GameObject.FindGameObjectWithTag("Camera Target").GetComponent<Transform>(); // y offset = -0.7 for new camera and -1.0 for newer camera from prototype cameraPositionOffset = new Vector3(0.0f, defaultHeight, defaultDistance); // x offset should not be edited as that will uncenter the camera cameraRotationOffset = new Vector3(-3.0f, 0, 0); //transform.position = positionTarget.position - cameraPositionOffset; //transform.LookAt(lookAtTarget.transform); }