partial void afterInitComponents(Resolver resolver, IOutfit outfit) { RenderLayer = AGSLayers.Foreground; IgnoreScalingArea = false; _hasOutfit.Outfit = outfit; }
public AGSArea(string id, Resolver resolver) : base(id, resolver) { _areaComponent = AddComponent<IAreaComponent>(); beforeInitComponents(resolver); InitComponents(); afterInitComponents(resolver); }
partial void afterInitComponents(Resolver resolver, IImage image) { RenderLayer = AGSLayers.UI; IgnoreScalingArea = true; IgnoreViewport = true; Anchor = new PointF (); Image = image; Enabled = true; }
partial void beforeInitComponents(Resolver resolver, IOutfit outfit) { TypedParameter objParameter = new TypedParameter(typeof(IObject), this); if (outfit != null) _faceDirectionBehavior.CurrentDirectionalAnimation = outfit[AGSOutfit.Idle]; TypedParameter outfitParameter = new TypedParameter(typeof(IHasOutfit), this); ISayLocationProvider location = resolver.Container.Resolve<ISayLocationProvider>(objParameter); TypedParameter locationParameter = new TypedParameter(typeof(ISayLocationProvider), location); TypedParameter faceDirectionParameter = new TypedParameter(typeof(IFaceDirectionBehavior), _faceDirectionBehavior); _sayBehavior = resolver.Container.Resolve<ISayBehavior>(locationParameter, outfitParameter, faceDirectionParameter); _walkBehavior = resolver.Container.Resolve<IWalkBehavior>(objParameter, outfitParameter, faceDirectionParameter); AddComponent(_sayBehavior); AddComponent(_walkBehavior); }
public AGSSprite (Resolver resolver, IMaskLoader maskLoader) { _maskLoader = maskLoader; _resolver = resolver; //todo: abstract it to the constructor _translate = new AGSTranslate(); _hasImage = new AGSHasImage(); _hasImage.Anchor = new PointF(); _rotate = new AGSRotate(); ScaleX = 1; ScaleY = 1; _hasImage.OnImageChanged.Subscribe((sender, args) => ScaleBy(ScaleX, ScaleY)); }
partial void beforeInitComponents(Resolver resolver);
partial void afterInitComponents(Resolver resolver, IOutfit outfit);
partial void beforeInitComponents(Resolver resolver, IOutfit outfit);
partial void afterInitComponents(Resolver resolver);
public AGSScaleComponent(Resolver resolver) { _resolver = resolver; }
partial void afterInitComponents(Resolver resolver) { RenderLayer = AGSLayers.Foreground; IgnoreScalingArea = true; }
private IMaskLoader _maskLoader; //We can't get mask loader in the constructor due to a circular dependency -> mask loader requires the game factory, and the game factory requires the object factory public AGSObjectFactory(Resolver resolver, IGameState gameState) { _resolver = resolver; _gameState = gameState; }
partial void afterInitComponents(Resolver resolver, IImage image);
partial void beforeInitComponents(Resolver resolver, IImage image);
public AGSArea(string id, Resolver resolver) : base(id, resolver) { _areaComponent = AddComponent <IAreaComponent>(); InitComponents(); }