Beispiel #1
0
    };                                                                                             // Lock Section : Check if an Object is in the player inventory using his ID


    // Use this for initialization
    void Start()
    {
        //--> Every Puzzle  ----> BEGIN <----
        camManager = GetComponent <focusCamEffect>();
        _conditionsToAccessThePuzzle = GetComponent <conditionsToAccessThePuzzle>();
        _actionsWhenPuzzleIsSolved   = GetComponent <actionsWhenPuzzleIsSolved>();
        //----> END <----


        //--> Common for all puzzle ----> BEGIN <----
        _detectClick = new detectPuzzleClick();                 // Access Class that allow to detect click (Mouse, Joystick, Mobile)


        for (var i = 0; i < lightList.Count; i++)
        {
            if (lightList[i] != null)
            {
                lightList[i] = lightList[i].GetComponent <Renderer>();
            }
        }



        a_Source = GetComponent <AudioSource>();
        //----> END <----
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        dragAndDrop = GetComponent <AP_.DragAndDrop>();

        for (var i = 0; i < pivotLogicList.Count; i++)
        {
            listOfSelectedPuzzlePosition.Add(pivotLogicList[i].transform.parent.GetComponent <SpriteRenderer>());
            pLogicList.Add(LogicList[i].GetComponent <Logic>());
            pLogicOnTriggerList.Add(LogicList[i].transform.GetChild(0).GetComponent <LogicCheckCollision>());
            inGameLogicsPositionList.Add(-1);
            inGameAxis.Add(false);

            if (!LogicsInitPositionWhenStart[i])
            {
                LogicList[i].transform.GetChild(0).tag = "Untagged";
                pivotLogicList[i].transform.parent.GetComponent <Collider>().enabled = false;
                LogicList[i].transform.GetChild(0).GetComponent <Collider>().enabled = false;
            }
        }

        //--> Every Puzzle  ----> BEGIN <----
        camManager = GetComponent <focusCamEffect>();
        _conditionsToAccessThePuzzle = GetComponent <conditionsToAccessThePuzzle>();
        _actionsWhenPuzzleIsSolved   = GetComponent <actionsWhenPuzzleIsSolved>();
        //----> END <----


        //--> Common for all puzzle ----> BEGIN <----
        _detectClick = new detectPuzzleClick();                 // Access Class that allow to detect click (Mouse, Joystick, Mobile)



        a_Source = GetComponent <AudioSource>();
        //----> END <----
    }
Beispiel #3
0
    };                                                                                             // Lock Section : Check if an Object is in the player inventory using his ID


    // Use this for initialization
    void Start()
    {
        //--> Every Puzzle  ----> BEGIN <----
        camManager = GetComponent <focusCamEffect>();
        _conditionsToAccessThePuzzle = GetComponent <conditionsToAccessThePuzzle>();
        _actionsWhenPuzzleIsSolved   = GetComponent <actionsWhenPuzzleIsSolved>();
        //----> END <----


        //--> Common for all puzzle ----> BEGIN <----
        _detectClick = new detectPuzzleClick();                 // Access Class that allow to detect click (Mouse, Joystick, Mobile)

        for (var i = 0; i < positionList.Count; i++)            // Save the default Mix. Use when puzzle is reset.
        {
            refPositionList.Insert(0, 0);
        }

        for (var i = 0; i < refPositionList.Count; i++)
        {
            refPositionList[i] = positionList[i];
        }

        a_Source = GetComponent <AudioSource>();
        //----> END <----
    }
Beispiel #4
0
    };                                                                             // Lock Section : Check if an Object is in the player inventory using his ID


    // Use this for initialization
    void Start()
    {
        //--> Every Puzzle  ----> BEGIN <----
        camManager = GetComponent <focusCamEffect>();
        _conditionsToAccessThePuzzle = GetComponent <conditionsToAccessThePuzzle>();
        _actionsWhenPuzzleIsSolved   = GetComponent <actionsWhenPuzzleIsSolved>();
        //----> END <----


        //--> Common for all puzzle ----> BEGIN <----
        _detectClick = new detectPuzzleClick();                 // Access Class that allow to detect click (Mouse, Joystick, Mobile)

        a_Source = GetComponent <AudioSource>();
        //----> END <----
    }
Beispiel #5
0
    public LayerMask myLayer;                                                   // Raycast is done only on layer 15 : Puzzle


    void Start()
    {
        uiVariousFunctions = gameObject.GetComponent <UIVariousFunctions>();
        m_EventSystem      = GetComponent <EventSystem>();
        _detectClick       = new detectPuzzleClick();
    }