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); }
public static ShootAspect Create(object owner) { ShootAspect aspect = new ShootAspect(owner); aspect.RegisterAllStuff(); return aspect; }