void Start() { // SFX sfxControllerGO = GameObject.Find("SFX Controller"); if (sfxControllerGO) { sfxControllerScript = sfxControllerGO.GetComponent <sfxController>(); } // Select first shape to flip (if a shape is pre-selected in editor) if (currentSelectedShape) { // This allows first clicks to move shape, without having to select // Important for single-shape levels? selectNewShape(currentSelectedShape); } else { // If only one shape, auto-select GameObject[] levelShapes = GameObject.FindGameObjectsWithTag("Shape"); if (levelShapes.Length > 0) { selectNewShape(levelShapes[0]); } } }
void Awake() { // SFX sfxControllerGO = GameObject.Find("SFX Controller"); if (sfxControllerGO) { sfxControllerScript = sfxControllerGO.GetComponent <sfxController>(); } }
void Start() { setScaleXY(baseScale); //myTriangle.alphaHitTestMinimumThreshold = 0.5f; // SFX sfxControllerGO = GameObject.Find("SFX Controller"); if (sfxControllerGO) { sfxControllerScript = sfxControllerGO.GetComponent <sfxController>(); } }
// ---------------------------- // Initialization // ---------------------------- void Start() { initializeFlippableShape(); paintTrailScript = transform.Find("PlayerMesh").gameObject.GetComponent(typeof(PaintTrail)) as PaintTrail; colorFlippableScript = gameObject.GetComponent <ColorFlippable>(); // SFX sfxControllerGO = GameObject.Find("SFX Controller"); if (sfxControllerGO) { sfxControllerScript = sfxControllerGO.GetComponent <sfxController>(); } }
void Start() { gameStatus = "StartScene"; shapeTrackerScript = shapeTracker.GetComponent <ShapeTracker>(); // SFX sfxControllerGO = GameObject.Find("SFX Controller"); if (sfxControllerGO) { sfxControllerScript = sfxControllerGO.GetComponent <sfxController>(); } if (endScreen == null) { findEndScreen(); } }
void Awake() { if (sceneToLoad.Length == 0) { sceneToLoad = findLevelName(); } setScaleXY(baseScale); myTriangle = gameObject.transform.GetChild(0).GetComponent <Image>(); // get the triangle image so we can change its color myLock = gameObject.transform.GetChild(1).GetComponent <Image>(); // get the lock image myNumberText = gameObject.transform.GetChild(2).GetComponent <Text>(); // get the lock image //myTriangle.alphaHitTestMinimumThreshold = 0.5f; // SFX sfxControllerGO = GameObject.Find("SFX Controller"); if (sfxControllerGO) { sfxControllerScript = sfxControllerGO.GetComponent <sfxController>(); } }