// Use this for initialization void Start() { // Script References shipGraphics = GetComponent<ShipGraphics>(); shipPhysicsScript = GetComponent<ShipPhysicsScript>(); // Component Variables cam = GetComponentInChildren<Camera>(); body = GetComponent<Rigidbody>(); model = transform.Find("Model").gameObject; capsuleCollider = GetComponentInChildren<CapsuleCollider>(); boxCollider = GetComponentInChildren<BoxCollider>(); lockSound = GetComponent<AudioSource>(); // Control Variables mouseSensitivity = 8.0f; //mouseThreshold = 8.0f; //buttonSensitivity = 0.05f; //buttonThreshold = 0.05f; horTranslation = 0.0f; verTranslation = 0.0f; enemyNoLock = (Material)Resources.Load("Crosshair"); enemyLock = (Material)Resources.Load("Crosshair_Enemy"); trackedObject = null; trackingResults = null; shootWaitTime = 0.0f; targetTime = 0.0f; hits = 0; }
// Use this for initialization void Start() { Screen.lockCursor = true; // Script References shipGraphics = GetComponent<ShipGraphics>(); shipPhysicsScript = GetComponent<ShipPhysicsScript>(); // Component Variables playerShip = GameObject.Find("Player"); enemyCam = transform.Find("EnemyCamera").gameObject; body = GetComponent<Rigidbody>(); model = transform.Find("Model").gameObject; capsuleCollider = GetComponentInChildren<CapsuleCollider>(); boxCollider = GetComponentInChildren<BoxCollider>(); lockSound = GetComponent<AudioSource>(); // Control Variables //mouseSensitivity = 8.0f; //mouseThreshold = 8.0f; //buttonSensitivity = 0.05f; //buttonThreshold = 0.05f; signatures = null; target = null; horTranslation = 0.0f; verTranslation = 1.0f; trackedObject = null; trackingResults = null; shootWaitTime = 0.0f; targetTime = 0.0f; health = 10; }