Esempio n. 1
0
    // Use this for initialization
    void Start()
    {

       //Instantiation of the Game Controller and the Icon Selector
        GameObject GameControllerObject_3 = GameObject.FindWithTag("GameController");
        if (GameControllerObject_3 != null){gameController_3 = GameControllerObject_3.GetComponent<GameController_3>();}
        if (gameController_3 == null)      {Debug.Log("Cannot find 'GameController 3' script");}

        GameObject IconSelectorObject = GameObject.FindWithTag("ICON_Selector");
        if (IconSelectorObject != null) {IconType = IconSelectorObject.GetComponent<ICON_Selector_3>();}
        if (IconSelectorObject == null) {Debug.Log("Cannot find 'Icon Selector 3' script");}

    }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        //Instantiation of The game controller, Icon selector and rigid body component
        GameObject GameControllerObject = GameObject.FindWithTag("GameController");
        if (GameControllerObject != null) { gameController = GameControllerObject.GetComponent<GameController_3>();}
        if (gameController == null){Debug.Log("Cannot find 'GameController 3' script");}

        GameObject IconSelectorObject = GameObject.FindWithTag("ICON_Selector");
        if (IconSelectorObject != null){IconType = IconSelectorObject.GetComponent<ICON_Selector_3>();}
        if (IconSelectorObject == null) {Debug.Log("Cannot find 'Icon Selector 3' script"); }

        rb = this.GetComponent<Rigidbody2D>();
        
    }