Beispiel #1
0
 protected virtual void OnMeleeChange(IMeleeWeapon weapon, bool set = false)
 {
     if (!set)
     {
     }
     else
     {
     }
 }
        static void Main(string[] args)
        {
            IMeleeWeapon MeleeWeapon = Generator.MeleeWeapon();

            IRangeWeapon RangeWeapon = Generator.RangeWeapon();

            // Constructor DI
            Hunter hunter = Generator.MakeHunter(MeleeWeapon, RangeWeapon);
            GearUp gearUp = Generator.ReadyGearUp();

            gearUp.HuntGearUp();

            IBehemoth behemoth = Generator.MakeBehemoth(gearUp.behemothType);

            IHunt Hunt = Generator.Hunt(gearUp.meleeWeapon, gearUp.rangeWeapon);

            Hunt.Attack(hunter, behemoth);

            Hunt.HuntResult(hunter, behemoth);

            Console.ReadKey();
        }
        static void Main()
        {
            IMeleeWeapon MeleeWeapon = Generator.MeleeWeapon();
            IRangeWeapon RangeWeapon = Generator.RangeWeapon();

            Hunter hunter = Generator.MakeHunter();
            GearUp gearUp = Generator.ReadyGearUp();

            gearUp.HuntGearUp();

            // Method DI
            hunter.EquipMeleeWeapon(new MeleeWeapon());
            hunter.EquipRangeWeapon(new RangeWeapon());

            IBehemoth behemoth = Generator.MakeBehemoth(gearUp.behemothType);

            IHunt Hunt = Generator.Hunt(gearUp.meeleWeapon, gearUp.rangeWeapon);

            Hunt.Attack(hunter, behemoth);

            Hunt.HuntResult(hunter, behemoth);

            Console.ReadKey();
        }
Beispiel #4
0
 public void EquipWeapon(IMeleeWeapon weapon)
 {
     this.meleeWeapon = weapon;
 }
		public MeleeToRangeAdapter(IMeleeWeapon melee)
		{
			meleeWeapon = melee;
		}
 public void EquipMeleeWeapon(IMeleeWeapon meleeWeapon)
 {
     _meleeWeapon = meleeWeapon;
 }
        protected override void OnAwake()
        {
            m_MeleeWeapon = GetComponent <IMeleeWeapon>();

            base.OnAwake();
        }
 public static Hunter MakeHunter(IMeleeWeapon meleeWeapon, IRangeWeapon rangeWeapon)
 {
     return(new Hunter(100, meleeWeapon, rangeWeapon));
 }
 // Constructor DI
 public Hunter(int health, IMeleeWeapon meleeWeapon, IRangeWeapon rangeWeapon)
 {
     this.health  = health;
     _meleeWeapon = meleeWeapon;
     _rangeWeapon = rangeWeapon;
 }
Beispiel #10
0
 public void Equip(IMeleeWeapon meleeWeapon)
 {
     throw new NotImplementedException();
 }