Exemple #1
0
    void Start()
    {
        /*
         * Initial setting for this game object.
         * The settings are like index setting and explanation settings.
         * These meant so that this game object know which explanation belong to this game object.
         */
        SetExhibition();

        //Get reference to this script for comparison purpose.
        scriptButtonExhibition = gameObject.GetComponent <ScriptButtonExhibition>();

        //Find a Player game object and then take its RectTransform component.
        playerRectTransform = GameObject.Find("Player").GetComponent <RectTransform>();
        //Get image player reference.
        playerImage = GameObject.Find("Player").GetComponent <Image>();

        //This game object Image.
        image = gameObject.GetComponent <Image>();
        //This game object RectTransform.
        rectTransform = gameObject.GetComponent <RectTransform>();

        //Get reference to panel log game object.
        panelLog       = GameObject.Find("PanelLog");
        scriptPanelLog = panelLog.GetComponent <ScriptPanelLog>();

        //Assign value to panelNotification.
        panelNotification       = GameObject.Find("PanelNotification");
        scriptPanelNotification = panelNotification.GetComponent <ScriptPanelNotification>();

        //Assign image based on gameObject.name.
        image.sprite = Resources.Load <Sprite>("AssetsImage/MuseumCards/" + gameObject.name);
    }
Exemple #2
0
    void Start()
    {
        /*
         * Get child game object from this game object variable
         *      and take its Text component.
         */
        child     = gameObject.transform.Find("Text");
        childText = child.gameObject.GetComponent <Text>();

        //Assign all references.
        panelLog       = GameObject.Find("PanelLog");
        scriptPanelLog = panelLog.GetComponent <ScriptPanelLog>();
        player         = GameObject.Find("Player");
        scriptPlayer   = player.GetComponent <ScriptPlayer>();
    }
Exemple #3
0
    void Start()
    {
        /*
         * Get the reference from the RectTransform component within this
         *      game object.
         */
        rectTransform = gameObject.GetComponent <RectTransform>();

        //Get reference from a GridLayoutGroup from this game object.
        gridLayoutGroup = gameObject.GetComponent <GridLayoutGroup>();

        //Assign value of border game object and its script.
        border       = GameObject.Find("Border");
        scriptBorder = border.GetComponent <ScriptBorder>();

        //Assign value to the panelLog and scriptPanelLog.
        panelLog       = GameObject.Find("PanelLog");
        scriptPanelLog = panelLog.GetComponent <ScriptPanelLog>();

        //Assign value to player and scriptPlayer,.
        player       = GameObject.Find("Player");
        scriptPlayer = player.GetComponent <ScriptPlayer>();
    }
    void Start()
    {
        /*
        Get the reference from the RectTransform component within this
            game object.
        */
        rectTransform = gameObject.GetComponent<RectTransform>();

        //Get reference from a GridLayoutGroup from this game object.
        gridLayoutGroup = gameObject.GetComponent<GridLayoutGroup>();

        //Assign value of border game object and its script.
        border = GameObject.Find("Border");
        scriptBorder = border.GetComponent<ScriptBorder>();

        //Assign value to the panelLog and scriptPanelLog.
        panelLog = GameObject.Find("PanelLog");
        scriptPanelLog = panelLog.GetComponent<ScriptPanelLog>();

        //Assign value to player and scriptPlayer,.
        player = GameObject.Find("Player");
        scriptPlayer = player.GetComponent<ScriptPlayer>();
    }
    void Start()
    {
        /*
        Initial setting for this game object.
        The settings are like index setting and explanation settings.
        These meant so that this game object know which explanation belong to this game object.
        */
        SetExhibition();

        //Get reference to this script for comparison purpose.
        scriptButtonExhibition = gameObject.GetComponent<ScriptButtonExhibition>();

        //Find a Player game object and then take its RectTransform component.
        playerRectTransform = GameObject.Find("Player").GetComponent<RectTransform>();
        //Get image player reference.
        playerImage = GameObject.Find("Player").GetComponent<Image>();

        //This game object Image.
        image = gameObject.GetComponent<Image>();
        //This game object RectTransform.
        rectTransform = gameObject.GetComponent<RectTransform>();

        //Get reference to panel log game object.
        panelLog = GameObject.Find("PanelLog");
        scriptPanelLog = panelLog.GetComponent<ScriptPanelLog>();

        //Assign value to panelNotification.
        panelNotification = GameObject.Find("PanelNotification");
        scriptPanelNotification = panelNotification.GetComponent<ScriptPanelNotification>();

        //Assign image based on gameObject.name.
        image.sprite = Resources.Load<Sprite>("AssetsImage/MuseumCards/" + gameObject.name);
    }
    void Start()
    {
        /*
        Get child game object from this game object variable
            and take its Text component.
        */
        child = gameObject.transform.Find("Text");
        childText = child.gameObject.GetComponent<Text>();

        //Assign all references.
        panelLog = GameObject.Find("PanelLog");
        scriptPanelLog = panelLog.GetComponent<ScriptPanelLog>();
        player = GameObject.Find("Player");
        scriptPlayer = player.GetComponent<ScriptPlayer>();
    }