private GameObject topRight; // Container for top right line and positions // Use this for initialization void Start() { // Create containers for the four tracks bottomLeft = new GameObject("Bottom Left Keys"); bottomLeft.transform.SetParent(transform); bottomLeft.transform.localPosition = Vector3.zero; bottomLeft.transform.localRotation = transform.localRotation; bottomLeft.transform.localScale = transform.localScale; bottomRight = new GameObject("Bottom Right Keys"); bottomRight.transform.SetParent(transform); bottomRight.transform.localPosition = Vector3.zero; bottomRight.transform.localRotation = transform.localRotation; bottomRight.transform.localScale = transform.localScale; topLeft = new GameObject("Top Left Keys"); topLeft.transform.SetParent(transform); topLeft.transform.localPosition = Vector3.zero; topLeft.transform.localRotation = transform.localRotation; topLeft.transform.localScale = transform.localScale; topRight = new GameObject("Top Right Keys"); topRight.transform.SetParent(transform); topRight.transform.localPosition = Vector3.zero; topRight.transform.localRotation = transform.localRotation; topRight.transform.localScale = transform.localScale; config = Constants.Configuration.Instance; torusRadius = Mathf.Cos(config.RingLatitude * Mathf.PI / 180) / 2; CreateTrackSections(); SetTracksActive(); DeleteKeys(); }
// Use this for initialization void Start() { config = Constants.Configuration.Instance; tag = "Tram"; highlited = false; currentClip = 0; waitOffset = 0; clipInCycle = 0; clipCount = 0; substringDivisor = 10; accelerationState = AccelerationState.None; // Set the highlighted and default materials DefaultMaterials = transform.GetChild(0).GetComponent <MeshRenderer>().materials; HighlightMaterials.Add(Resources.Load("Silhouetted Diffuse") as Material); HighlightMaterials.Add(Resources.Load("Silhouetted Diffuse") as Material); for (int i = HighlightMaterials.Count - 1; i < DefaultMaterials.Length; i++) { HighlightMaterials.Add(DefaultMaterials[i]); } // Now that our arrays have been initialized, we can create our first two clips if (!travelTram) { StartCoroutine("CreateClips", 2); } else { startTime = Time.unscaledTime; } }
private Constants.Configuration config; // Holds reference to config file // Use this for initialization void Start() { starting = false; config = Constants.Configuration.Instance; fadeTime = config.FadeTime; }
// Use this for initialization void Start() { resettingTransform = false; velocity = Vector3.zero; config = Constants.Configuration.Instance; fadeTime = config.FadeTime; }
private Constants.Configuration config; // Holds renference to config file // Use this for initialization void Start() { config = Constants.Configuration.Instance; EarthPosition.x = Mathf.Cos(config.RingLatitude * Mathf.PI / 180) / 2 * (EarthRadius + RingAltitude) / EarthRadius; EarthPosition.y = Mathf.Sin(config.RingLatitude * Mathf.PI / 180) / 2 * (EarthRadius + RingAltitude) / EarthRadius; //y = 0.4478496f; EarthPosition.z = 0; }
private Constants.Configuration config; // Holds reference to config file void Start() { config = Constants.Configuration.Instance; tetheredRingRadius = Mathf.Cos(config.RingLatitude * Mathf.PI / 180) / 2; RefreshElevatorCables(); FloatingMenu.Instance.AddItems(carrier_prefab, "Carrier", new Vector3(0.04f, 0.04f, 0.04f)); FloatingMenu.Instance.AddItems(climber_prefab.transform.GetChild(0).gameObject, "Elevator", new Vector3(0.15f, 0.15f, 0.15f)); }
private GameObject menuStay; // Stay with thicker radius to be passed to floating menu void Start() { config = Constants.Configuration.Instance; tetheredRingRadius = Mathf.Cos(config.RingLatitude * Mathf.PI / 180) / 2; RefreshStays(); FloatingMenu.Instance.AddItems(menuStay, "Stays", new Vector3(250, 500, 1000)); Destroy(menuStay); }
// Use this for initialization void Start() { config = Constants.Configuration.Instance; startIndex = 3; // Set start/end index to only draw habitats visible to the user endIndex = 97; torusRadius = Mathf.Cos(config.RingLatitude * Mathf.PI / 180) / 2; RefreshRingHabitats(); // Create habitats and their sections UpdatePositions(); // Move habitats to be adjacent to transit ring FloatingMenu.Instance.AddItems(habitat, "Habitat", new Vector3(3.25f, 3.25f, 3.25f)); }
// Use this for initialization void Start() { config = Constants.Configuration.Instance; habitatIndex = (int)numKeysPerSection / RingHabitats.Instance.numRingHabitatsPerInstance; startIndex = 1; // Set start/end section to only draw cars that can be seen by the user endIndex = 8; torusRadius = Mathf.Cos(config.RingLatitude * Mathf.PI / 180) / 2; CreateTramSections(); // Create all trams and keys UpdateKeyPositions(); // Move keys to proper positions CreateClipNames(); // Create list of clip names SetKeysToTrams(); // Now that all trams and sections are created, set all the tram keys for their movement DeleteKeys(); // Delete keys as they are no longer needed FloatingMenu.Instance.AddItems(train, "Tram", new Vector3(1, 1, 1)); }
private bool highlited; // Current materials used void Start() { config = Constants.Configuration.Instance; highlited = false; tetheredRingRadius = Mathf.Cos(config.RingLatitude * Mathf.PI / 180) / 2; RefreshRing(); GameObject p = Instantiate(gameObject, transform.parent); p.GetComponent <Ring>().enabled = false; if (TramRing) { FloatingMenu.Instance.AddItems(p, "Transit Ring", new Vector3(14, 2860, 15), furthestPoint); tag = "Ring - Transit"; } else { FloatingMenu.Instance.AddItems(p, "Tethered Ring", new Vector3(14, 2860, 15), furthestPoint); tag = "Ring"; } }
void Start() { config = Constants.Configuration.Instance; fadeTime = config.FadeTime; }
void Start() { config = Constants.Configuration.Instance; // atmosphericEffect = GameObject.FindGameObjectWithTag("Atmosphere").GetComponent<MeshRenderer>(); }
private float startTime; // Time script was enabled // Use this for initialization void Start() { Instance = this; config = Constants.Configuration.Instance; enabled = false; }