Пример #1
0
    /* --------------------------------------------------------------------- */

    #region Construction

    #endregion

    /* --------------------------------------------------------------------- */

    #region Unity Methods

    // Use this for initialization
    void Start()
    {
        this._bulletPool = new List <PlayerBullet>();

        for (int i = 0; i < this._bulletLimit; i++)
        {
            GameObject   playerBullet       = Instantiate(this._bulletPrefab);
            PlayerBullet playerBulletScript = playerBullet.GetComponent <PlayerBullet>();
            playerBulletScript.Initialise(this);

            this._bulletPool.Add(playerBulletScript);
        }
    }