Example #1
0
        partial void afterInitComponents(Resolver resolver, IOutfit outfit)
		{
			RenderLayer = AGSLayers.Foreground;
			IgnoreScalingArea = false;

			_hasOutfit.Outfit = outfit;
		}
Example #2
0
        public AGSArea(string id, Resolver resolver) : base(id, resolver)
        {
            _areaComponent = AddComponent<IAreaComponent>();

            beforeInitComponents(resolver);
            InitComponents();
            afterInitComponents(resolver);
        }
Example #3
0
		partial void afterInitComponents(Resolver resolver, IImage image)
		{
			RenderLayer = AGSLayers.UI;
			IgnoreScalingArea = true;
			IgnoreViewport = true;
			Anchor = new PointF ();
			Image = image;
			Enabled = true;
		}        
Example #4
0
 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);
 }
Example #5
0
		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));
        }
Example #6
0
 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;
 }
Example #11
0
 partial void afterInitComponents(Resolver resolver)
 {
     RenderLayer       = AGSLayers.Foreground;
     IgnoreScalingArea = true;
 }
Example #12
0
        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;
        }
Example #13
0
 partial void afterInitComponents(Resolver resolver, IImage image);
Example #14
0
 partial void beforeInitComponents(Resolver resolver, IImage image);
Example #15
0
 partial void afterInitComponents(Resolver resolver);
 partial void beforeInitComponents(Resolver resolver);
Example #17
0
        public AGSArea(string id, Resolver resolver) : base(id, resolver)
        {
            _areaComponent = AddComponent <IAreaComponent>();

            InitComponents();
        }