Example #1
0
    //===================================================================================================================================
    //Unity Functions
    // Use this for initialization
    void Start()
    {
        //get different scripts of the game controller object
        gameController = GameObject.Find("GameController");
        gc_s           = gameController.GetComponent <GameControl_Script>();
        btd_s          = gameController.GetComponent <BulletTypeDisplay_Script>();
        sw_s           = gameController.GetComponent <Switch_Script>();

        //get reference to the rigidbody of the player
        rb = GetComponent <Rigidbody2D> ();
    }
    //===================================================================================================================================
    //Unity Functions
    // Use this for initialization
    void Start()
    {
        //get different scripts of the game controller object
        gameController = GameObject.Find ("GameController");
        gc_s = gameController.GetComponent<GameControl_Script>();
        btd_s = gameController.GetComponent<BulletTypeDisplay_Script>();
        sw_s = gameController.GetComponent<Switch_Script>();

        //get reference to the rigidbody of the player
        rb = GetComponent<Rigidbody2D> ();
    }