Пример #1
0
    protected override void InitWindow()
    {
        Debug.Log("Init Puzzle01 window");
        base.InitWindow();

        GCP01 = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameControllerPuzzle01>();

        Debug.Log("Call GameController of Puzzle01 to connect");
        GCP01.InitGameController(this);

        //Init Components
        txtInstruction.text = "";

        txtFBFormula.text = "";
        txtFBTF.text      = "";
        txtFBTips.text    = "";

        SetActive(iptPanel, false);
        SetActive(feedbackPanel, false);

        foreach (Image image in PlatformTips)
        {
            SetActive(image, true);
        }

        foreach (Image image in PlatformTipsChecked)
        {
            SetActive(image, false);
        }
    }
Пример #2
0
    public void InitDatabase()
    {
        Debug.Log("Connect GameController of Puzzle01");
        GCP01 = GetComponent <GameControllerPuzzle01>();

        //Convert all data in Unity xyz standard into math xyz standard
        foreach (Transform T in points)
        {
            pointVectors.Add(new Vector3(T.position.x, T.position.z, T.position.y));
        }

        //Init first line tip from point 1 to point 2
        InitLineTips(lineTips[0], points[0].position, points[1].position, Color.yellow, Color.yellow);
        iptX      = 1;
        iptY      = 1;
        iptZ      = 1;
        iptScalar = 1;
        InitLineTips(lineTips[1], points[0].position, points[0].position + new Vector3(iptX, iptY, iptZ), Color.red, Color.red);
    }
Пример #3
0
 private void Start()
 {
     GCP01 = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameControllerPuzzle01>();
 }