Esempio n. 1
0
        private Weapon(object owner, Side weaponSide)
            : base(owner)
        {
            this.shipSide = weaponSide;
            shooter = ShootAspect.Create(this);

            // собственные обработчики класса
            messageHandler.Handlers.Add(typeof(ButtonDown), HandleButtonDown);
            messageHandler.Handlers.Add(typeof(InformPosition), HandleInformPosition);
        }
Esempio n. 2
0
 public static ShootAspect Create(object owner)
 {
     ShootAspect aspect = new ShootAspect(owner);
     aspect.RegisterAllStuff();
     return aspect;
 }