Пример #1
0
    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]);
            }
        }
    }
Пример #2
0
 void Awake()
 {
     // SFX
     sfxControllerGO = GameObject.Find("SFX Controller");
     if (sfxControllerGO)
     {
         sfxControllerScript = sfxControllerGO.GetComponent <sfxController>();
     }
 }
Пример #3
0
    void Start()
    {
        setScaleXY(baseScale);

        //myTriangle.alphaHitTestMinimumThreshold = 0.5f;


        // SFX
        sfxControllerGO = GameObject.Find("SFX Controller");
        if (sfxControllerGO)
        {
            sfxControllerScript = sfxControllerGO.GetComponent <sfxController>();
        }
    }
Пример #4
0
    // ----------------------------
    // 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>();
        }
    }
Пример #5
0
    void Start()
    {
        gameStatus         = "StartScene";
        shapeTrackerScript = shapeTracker.GetComponent <ShapeTracker>();

        // SFX
        sfxControllerGO = GameObject.Find("SFX Controller");
        if (sfxControllerGO)
        {
            sfxControllerScript = sfxControllerGO.GetComponent <sfxController>();
        }

        if (endScreen == null)
        {
            findEndScreen();
        }
    }
Пример #6
0
    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>();
        }
    }