示例#1
0
 void Start()
 {
     map = GameObject.Find("Map").gameObject;
     cameraController = GameObject.Find("Main Camera").GetComponent <CameraController>();
     roundController  = GameObject.Find("CalculatorCanvas").GetComponent <RoundController>();
     piecePlace       = GameObject.Find("LevelManager").GetComponent <PiecePlace>();
     levelManager     = GameObject.Find("LevelManager").GetComponent <LevelManager>();
 }
示例#2
0
    void Start()
    {
        levelManager    = GameObject.Find("LevelManager").GetComponent <LevelManager>();
        piecePlace      = levelManager.GetComponent <PiecePlace>();
        roundController = gameObject.GetComponent <RoundController>();

        scoreTextA  = gameObject.transform.FindChild("ScoreTextA").GetComponent <Text>();
        scoreTextB  = gameObject.transform.FindChild("ScoreTextB").GetComponent <Text>();
        scorePanelB = gameObject.transform.FindChild("PanelB").gameObject.GetComponent <Image>();

        scoreTextB.gameObject.SetActive(false);
        scorePanelB.enabled = false;
    }
示例#3
0
    void Start()
    {
        // set all scores to zero initially
        setValues(0, 0, 0, 0);

        spriteRenderer = GetComponent <SpriteRenderer>();
        levelManager   = GameObject.Find("LevelManager").GetComponent <LevelManager>();
        levelEditor    = GameObject.Find("EditorCanvas").GetComponent <LevelEditor>();
        mapModeCanvas  = GameObject.Find("MapModeCanvas").GetComponent <MapModeCanvas>();
        piecePlace     = GameObject.Find("LevelManager").GetComponent <PiecePlace>();

        calculateAllColors();
        changeColor(colorCache[mapModeCanvas.currentMode]);
    }
示例#4
0
    void Start()
    {
        piecePlace    = GameObject.Find("LevelManager").GetComponent <PiecePlace>();
        button        = gameObject.GetComponent <Button>();
        image         = gameObject.transform.FindChild("Image").GetComponent <Image>();
        remainderText = gameObject.transform.FindChild("Remainder").GetComponent <Text>();

        ColorBlock colorBlock = button.colors;

        colorBlock.normalColor = highlightColor;
        button.colors          = colorBlock;

        defaultColor = colorBlock.disabledColor;

        if (pieceType == PiecePlace.PieceType.Port)
        {
            select();
        }
        else
        {
            deselect();
        }
    }