Example #1
0
 void Awake()
 {
     _weaponsFactory = gameObject.GetComponentInChildren <IWeaponsFactory>();
     if (_weaponsFactory == null)
     {
         _weaponsFactory = gameObject.GetComponentInParent <IWeaponsFactory>();
         if (_weaponsFactory == null)
         {
             throw new Exception("Weapons factory not found!");
         }
     }
 }
Example #2
0
 public PrintCommand(IWeaponsFactory weaponsFactory, IList <string> args, IWriter writer)
 {
     this.weaponsFactory = weaponsFactory;
     this.args           = new List <string>(args);
     this.writer         = writer;
 }
Example #3
0
 public AddCommand(IWeaponsFactory weaponsFactory, IList <string> args)
 {
     this.weaponsFactory = weaponsFactory;
     this.args           = new List <string>(args);
 }