void Start() { if (GameObject.Find("MenuManager")) { MenuManager = GameObject.Find("MenuManager").GetComponent <menuManager>(); } }
void Awake() { mat = transform.GetChild(0).GetComponent <Renderer>().material; manager = transform.parent.parent.GetComponent <menuManager>(); offColor = Color.HSVToRGB(.6f, .7f, .9f); mat.SetColor("_TintColor", offColor); mat.SetFloat("_EmissionGain", .2f); }
void Start() { Instance = this; //Disable server and connect menu serverMenu.SetActive(false); connectMenu.SetActive(false); DontDestroyOnLoad(gameObject); }
// Use this for initialization void Awake() { Instance = this; // Determine if PC Host or Mobile player, and set parameters based on that. animator.Play(Animator.StringToHash("introPlayer"), -1, 0); //Play Intro sound soundManager.playMusic(soundManager.soundList["introMenu"], false, 1f, 0.95f); colorManager.onInitialize(); }
private void Start() { game = GameObject.Find("gameManager"); menu = game.GetComponent <menuManager>(); anim = GetComponent <pAnimController>(); aim = GetComponent <charTorsoAim>(); sound = GetComponent <soundPack>(); maxHealth = health; }
private void Awake() { if (!instance) { instance = this; } else { Destroy(this); } }
public override void Awake() { base.Awake(); normalColor = Color.HSVToRGB(.6f, 1f, .06f); normalOnColor = Color.HSVToRGB(.6f, .95f, .2f); selectColor = Color.HSVToRGB(.6f, .95f, .5f); grabColor = Color.HSVToRGB(.6f, .9f, 1f); mat = gearRenderer.material; mat.SetColor("_TintColor", normalColor); manager = transform.parent.parent.GetComponent <menuManager>(); }
void OnEnable() { manager = FindObjectOfType <menuManager> (); if (strength > 0) { cardEffect = affectedStat.ToString() + " +" + strength.ToString(); } else { cardEffect = affectedStat.ToString() + " " + strength.ToString(); } }
// Use this for initialization void Awake() { if (instance == null) { instance = this; } else { Destroy(this.gameObject); return; } sfxHandle = volumeSFXSliders.gameObject.transform.FindChild("Handle Slide Area").gameObject.transform.FindChild("Handle").gameObject; MusicHandle = volumeMusicSliders.gameObject.transform.FindChild("Handle Slide Area").gameObject.transform.FindChild("Handle").gameObject; }
void Awake() { instance = this; refObjects = new Dictionary <menuItem.deviceType, GameObject>(); _audioSource = GetComponent <AudioSource>(); loadMenu(); loadNonMenuItems(); loaded = true; Activate(false, transform); if (!PlayerPrefs.HasKey("midiOut")) { PlayerPrefs.SetInt("midiOut", 0); } if (PlayerPrefs.GetInt("midiOut") == 1) { toggleMidiOut(true); } }
void Start() { myAudio = GameObject.Find("FxAudioButton").GetComponent <AudioSource>(); MenuManager = GameObject.Find("MenuManager").GetComponent <menuManager>(); wayPointList = GameObject.FindGameObjectsWithTag("WayPoint"); _resourcesManager = GameObject.Find("ResourcesManager").GetComponent <resourcesManager>(); _stageManager = GameObject.Find("StageManager").GetComponent <stageManager>(); if (PlayerPrefs.HasKey("TutorialEnd") && PlayerPrefs.GetInt("showOutNotice") == 1) { Invoke("showOutNotice", 2f); StartCoroutine("setWayPoint"); pointDestiny = wayPointList[0]; PlayerPrefs.SetInt("showOutNotice", 0); } else { PlayerPrefs.SetString("TutorialEnd", "..."); } }
public GameObject Setup(deviceType d) { item = d; tex = Resources.Load("Textures/" + item.ToString() + "Symbol") as Texture; symbol.material.SetTexture("_MainTex", tex); itemPrefab = Resources.Load("Prefabs/" + item.ToString()) as GameObject; label.text = item.ToString(); if (item == deviceType.Valve) { label.text = "Gate"; } if (item == deviceType.MIDIIN) { label.text = "MIDI IN"; } if (item == deviceType.MIDIOUT) { label.text = "MIDI OUT"; } if (item == deviceType.Sequencer) { label.text = "Drum Machine"; } if (item == deviceType.Timeline) { label.text = "Sequencer"; } label.gameObject.SetActive(false); symbol.gameObject.SetActive(false); GameObject g = Instantiate(itemPrefab, transform.position, transform.rotation) as GameObject; g.transform.parent = transform; manager = transform.parent.parent.GetComponent <menuManager>(); Vector3 size = Vector3.zero; Vector3 center = Vector3.zero; if (item == deviceType.Sequencer) { for (int i = 0; i < 2; i++) { for (int i2 = 0; i2 < 4; i2++) { GameObject cube = Instantiate(g.GetComponent <sequencerDeviceInterface>().touchCubePrefab, transform.position, transform.rotation) as GameObject; cube.transform.parent = g.transform; cube.transform.Translate(Vector3.right * i2 * -.04f, Space.Self); cube.transform.Translate(Vector3.up * i * -.04f, Space.Self); } GameObject seq = Instantiate(g.GetComponent <sequencerDeviceInterface>().samplerPrefab, transform.position, transform.rotation) as GameObject; seq.transform.parent = g.transform; seq.transform.Translate(Vector3.right * .081f, Space.Self); seq.transform.Translate(Vector3.up * i * -.04f, Space.Self); } Destroy(g.transform.Find("stretchNode").gameObject); } if (item == deviceType.Tapes) { GameObject tape = Instantiate(g.GetComponent <libraryDeviceInterface>().tapePrefab, transform, false) as GameObject; Destroy(g); g = tape; } if (item == deviceType.Timeline) { GameObject tl = Instantiate(Resources.Load("Prefabs/timelineRep") as GameObject, transform, false) as GameObject; Destroy(g); g = tl; } MonoBehaviour[] m = g.GetComponentsInChildren <MonoBehaviour>(); for (int i = 0; i < m.Length; i++) { Destroy(m[i]); } AudioSource[] audios = g.GetComponentsInChildren <AudioSource>(); for (int i = 0; i < audios.Length; i++) { Destroy(audios[i]); } Rigidbody[] rig = g.GetComponentsInChildren <Rigidbody>(); for (int i = 0; i < rig.Length; i++) { Destroy(rig[i]); } Renderer[] r = g.GetComponentsInChildren <Renderer>(); for (int i = 0; i < r.Length; i++) { r[i].material = menuMat; if (r[i].bounds.size.sqrMagnitude > size.sqrMagnitude) { size = r[i].bounds.size; center = r[i].bounds.center; } } Collider[] c = g.GetComponentsInChildren <Collider>(); for (int i = 0; i < c.Length; i++) { Destroy(c[i]); } tooltips t = GetComponentInChildren <tooltips>(); if (t != null) { Destroy(t.gameObject); } g.tag = "Untagged"; g.transform.localScale = g.transform.localScale / (size.magnitude * 20); g.transform.localPosition = g.transform.localPosition + Vector3.forward * .02f; if (item == deviceType.Maracas) { g.transform.localPosition = new Vector3(0, -.02f, .02f); } if (item == deviceType.Camera) { g.transform.localRotation = Quaternion.Euler(90, 0, 0); Camera[] cams = g.GetComponentsInChildren <Camera>(); for (int i = 0; i < cams.Length; i++) { Destroy(cams[i].gameObject); } Destroy(g.transform.Find("screenFrame").gameObject); } if (item == deviceType.Realview) { g.transform.localRotation = Quaternion.Euler(0, 180, 0); } if (item == deviceType.Keyboard) { g.transform.localPosition = new Vector3(0.013f, 0, .026f); g.transform.localScale = Vector3.one * .08f; Destroy(g.transform.Find("KeyboardTimeline").gameObject); } if (item == deviceType.XyloRoll) { g.transform.localPosition = new Vector3(.0239f, 0, .02f); g.transform.localScale = Vector3.one * .087f; g.transform.localRotation = Quaternion.Euler(34, 0, 0); Destroy(g.transform.Find("KeyboardTimeline").gameObject); Destroy(g.transform.Find("OscillatorBank").gameObject); Destroy(g.transform.Find("ADSR").gameObject); } if (item == deviceType.MIDIOUT) { Destroy(g.transform.Find("CChandle").gameObject); Destroy(g.transform.Find("NOTEhandle").gameObject); } if (item == deviceType.Airhorn) { g.transform.localPosition = new Vector3(-0.005f, -.018f, 0.02f); g.transform.localRotation = Quaternion.Euler(0, 90, 0); g.transform.localScale = Vector3.one * .14f; } if (item == deviceType.Tapes) { g.transform.localPosition = new Vector3(0, 0, 0.02f); g.transform.localRotation = Quaternion.Euler(0, 0, 0); } if (item == deviceType.Timeline) { g.transform.localPosition = new Vector3(0, 0, 0.02f); g.transform.localRotation = Quaternion.Euler(0, 0, 0); } if (item == deviceType.Filter) { g.transform.localPosition = new Vector3(.015f, 0, .02f); g.transform.localRotation = Quaternion.Euler(0, 180, 0); } if (item == deviceType.Splitter) { g.transform.localPosition = new Vector3(.0185f, 0, .02f); } if (item == deviceType.Sequencer) { g.transform.localScale = Vector3.one * .166f; } if (item == deviceType.ControlCube) { g.transform.localPosition = new Vector3(0, -.01f, .024f); } if (item == deviceType.Reverb) { g.transform.localPosition = new Vector3(0, -0.0175f, .02f); } if (item == deviceType.Drum) { g.transform.localPosition = new Vector3(0, 0, .026f); g.transform.localRotation = Quaternion.Euler(40, 0, 0); } if (item == deviceType.Mixer) { g.transform.localPosition = new Vector3(0.014f, 0, .02f); g.transform.localRotation = Quaternion.Euler(60, 0, 0); } return(g); }
void Start() { glowRender = glowNode.GetComponent <Renderer>().material; glowNode.SetActive(false); menu = menuManager.instance; }
void Start() { myAudio = GameObject.Find("FxAudio").GetComponent <AudioSource>(); MenuManager = GameObject.Find("MenuManager").GetComponent <menuManager>(); }
void Awake() { Instance = this; }
private void Start() { menu = GameObject.Find("gameManager").GetComponent <menuManager>(); }