//marker #endregion #region Awake Ship Setting void Awake(){ invitedShips = new List<Ship>(); startHeight = transform.position.y; if (GameObject.FindObjectOfType<ComradManager> ()){ theUniterShip = GameObject.FindObjectOfType<ComradManager> ().theUniterShip; } else{ Destroy(gameObject); } comradManager = theUniterShip.GetComradManager; if (shipType == ShipType.TheUniter) { #region TheUniterShip values isComrad = true; inputManager = Component.FindObjectOfType<InputManager>(); cameraThrusters = Component.FindObjectOfType<Camera_Thrusters>(); uniterRespawner = Component.FindObjectOfType<UniterRespawner>(); if (uniterRespawner){ uniterRespawner.SetUniter(this); } rotationSpeed = 0.05f; conversionTime = 5f; maxElevationHeight = 6f; Ship[] allShips = GameObject.FindObjectsOfType<Ship>(); foreach (Ship ship in allShips){ ship.GetTheUniterShip = this; ship.GetComradManager = comradManager; ship.ShotDirector = shotDirector; ship.MedicalBayHQ = medicalBayHQ; } #endregion } else if (shipType == ShipType.Normal) { #region NormalShip values rotationSpeed = 0.1f; conversionTime = 1f; maxElevationHeight = 2f; #endregion } else if (shipType == ShipType.Alpha) { #region AlphaShip values rotationSpeed = 0.07f; conversionTime = 2f; maxElevationHeight = 4f; #endregion } else if (shipType == ShipType.Bravo) { #region BravoShip values rotationSpeed = 0.03f; conversionTime = 3f; maxElevationHeight = 5f; #endregion } elevationForce = 5f; maxElevationSpeed = 5f; }
//marker #endregion #region Awake Ship Setting void Awake() { invitedShips = new List <Ship>(); startHeight = transform.position.y; if (GameObject.FindObjectOfType <ComradManager> ()) { theUniterShip = GameObject.FindObjectOfType <ComradManager> ().theUniterShip; } else { Destroy(gameObject); } comradManager = theUniterShip.GetComradManager; if (shipType == ShipType.TheUniter) { #region TheUniterShip values isComrad = true; inputManager = Component.FindObjectOfType <InputManager>(); cameraThrusters = Component.FindObjectOfType <Camera_Thrusters>(); uniterRespawner = Component.FindObjectOfType <UniterRespawner>(); if (uniterRespawner) { uniterRespawner.SetUniter(this); } rotationSpeed = 0.05f; conversionTime = 5f; maxElevationHeight = 6f; Ship[] allShips = GameObject.FindObjectsOfType <Ship>(); foreach (Ship ship in allShips) { ship.GetTheUniterShip = this; ship.GetComradManager = comradManager; ship.ShotDirector = shotDirector; ship.MedicalBayHQ = medicalBayHQ; } #endregion } else if (shipType == ShipType.Normal) { #region NormalShip values rotationSpeed = 0.1f; conversionTime = 1f; maxElevationHeight = 2f; #endregion } else if (shipType == ShipType.Alpha) { #region AlphaShip values rotationSpeed = 0.07f; conversionTime = 2f; maxElevationHeight = 4f; #endregion } else if (shipType == ShipType.Bravo) { #region BravoShip values rotationSpeed = 0.03f; conversionTime = 3f; maxElevationHeight = 5f; #endregion } elevationForce = 5f; maxElevationSpeed = 5f; }