コード例 #1
0
        // Use this for initialization
        void Start()
        {
            GunFactory _gunFactory = new GunFactory();
            GunStore   _gunStroe   = new GunStore(_gunFactory);

            var equipment = _gunStroe.BuyWeapon(WhatYouBuy);

            equipment.GetComponent <Weapon>().Shot();
        }
コード例 #2
0
 public GunStore(GunFactory factory)
 {
     this._factory = factory;
 }