void Start() { player = GameObject.FindObjectOfType<Player>(); profile = GameObject.FindObjectOfType<Profile>(); dotSpawner = GameObject.FindObjectOfType<DotSpawner>(); feerieSpawner = GameObject.FindObjectOfType<FeerieSpawner>(); message = GameObject.Find("Message").GetComponent<Text>(); timeButtons = RectTransform.FindObjectsOfType<Button>(); Button[] newTimeButtons = new Button[timeButtons.Length]; for (int i = 0; i < timeButtons.Length; i++) { for (int j = 0; j < timeButtons.Length; j++) { if (timeButtons[j].name.Contains((i + 1).ToString())) { newTimeButtons[i] = timeButtons[j]; break; } } } timeButtons = newTimeButtons; hideButtons(); dotSpawner.setMode(DotSpawner.ModeSpawner.silent); //feerieSpawner.setSilence(true); startTimer = 0f; started = false; unlocked = false; Screen.sleepTimeout = 10; }
void MakeInstance() { if (instance == null) { instance = this; } }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
void Start() { DontDestroyOnLoad(GameObject.FindGameObjectWithTag("PP")); v = GameObject.FindGameObjectWithTag("PP").GetComponent <Volume>()?.profile; v.TryGet(out vg); dotSpawner = DotSpawner.instance; OpenUp = GameObject.FindGameObjectWithTag("OpenUP").GetComponent <ShowThis>(); target = GameObject.FindGameObjectWithTag("Player").transform; Recolour(saturation, brightness); }
void Start () { gestureRecognitionController = GestureRecognitionController.instance; List<Gesture> gestures = new List<Gesture>(); for (int i = 0; i < savedGestures.Count; i++) { gestures.Add(new Gesture()); for (int j = 0; j < savedGestures[i].points.Count; j++) { gestures[i].points.Add(savedGestures[i].points[j]); } } gestureRecognitionController.Init(gestures); dotSpawner = GameObject.FindObjectOfType<DotSpawner>(); points = new List<Vector2>(); isDown = false; lastMousePosition = Vector2.zero; nextId = 0; hasDoneUnlockSign = false; sleepTimer = 0f; hasTouched = false; }
// Use this for initialization void Start() { Instance = this; _Dots = FindObjectOfType <Dots> (); SpawnDot(); }