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

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

            beforeInitComponents(resolver);
            InitComponents();
            afterInitComponents(resolver);
        }
예제 #3
0
		partial void afterInitComponents(Resolver resolver, IImage image)
		{
			RenderLayer = AGSLayers.UI;
			IgnoreScalingArea = true;
			IgnoreViewport = true;
			Anchor = new PointF ();
			Image = image;
			Enabled = true;
		}        
예제 #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);
 }
예제 #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));
        }
예제 #6
0
 partial void beforeInitComponents(Resolver resolver);
예제 #7
0
 partial void afterInitComponents(Resolver resolver, IOutfit outfit);
예제 #8
0
 partial void beforeInitComponents(Resolver resolver, IOutfit outfit);
예제 #9
0
 partial void afterInitComponents(Resolver resolver);
예제 #10
0
 public AGSScaleComponent(Resolver resolver)
 {
     _resolver = resolver;
 }
예제 #11
0
 partial void afterInitComponents(Resolver resolver)
 {
     RenderLayer       = AGSLayers.Foreground;
     IgnoreScalingArea = true;
 }
예제 #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;
        }
예제 #13
0
 partial void afterInitComponents(Resolver resolver, IImage image);
예제 #14
0
 partial void beforeInitComponents(Resolver resolver, IImage image);
예제 #15
0
 partial void afterInitComponents(Resolver resolver);
예제 #16
0
 partial void beforeInitComponents(Resolver resolver);
예제 #17
0
        public AGSArea(string id, Resolver resolver) : base(id, resolver)
        {
            _areaComponent = AddComponent <IAreaComponent>();

            InitComponents();
        }