Esempio n. 1
0
        public IAGSEdges ToItem(AGSSerializationContext context)
        {
            AGSEdges edges = new AGSEdges(Left.ToItem(context), Right.ToItem(context),
                                          Top.ToItem(context), Bottom.ToItem(context));

            return(edges);
        }
Esempio n. 2
0
        public IRoom GetRoom(string id, float leftEdge = 0f, float rightEdge = 0f, float topEdge = 0f, float bottomEdge = 0f)
        {
            AGSEdges       edges     = new AGSEdges(GetEdge(leftEdge), GetEdge(rightEdge), GetEdge(topEdge), GetEdge(bottomEdge));
            TypedParameter edgeParam = new TypedParameter(typeof(IAGSEdges), edges);
            TypedParameter idParam   = new TypedParameter(typeof(string), id);
            IRoom          room      = _resolver.Container.Resolve <IRoom>(idParam, edgeParam);

            return(room);
        }
Esempio n. 3
0
		public IRoom GetRoom(string id, float leftEdge = 0f, float rightEdge = 0f, float topEdge = 0f, float bottomEdge = 0f)
		{
			AGSEdges edges = new AGSEdges (GetEdge(leftEdge), GetEdge(rightEdge), GetEdge(topEdge), GetEdge(bottomEdge));
			TypedParameter edgeParam = new TypedParameter (typeof(IAGSEdges), edges);
			TypedParameter idParam = new TypedParameter (typeof(string), id);
			IRoom room = _resolver.Resolve<IRoom>(idParam, edgeParam);
			room.Viewport.Camera = _resolver.Resolve<ICamera>();
            IGameState state = _resolver.Resolve<IGameState>();
            room.Viewport.Camera.Target = () => state.Player;
			return room;
		}
Esempio n. 4
0
        public IRoom GetRoom(string id, float leftEdge = 0f, float rightEdge = 0f, float topEdge = 0f, float bottomEdge = 0f)
        {
            AGSEdges       edges     = new AGSEdges(GetEdge(leftEdge), GetEdge(rightEdge), GetEdge(topEdge), GetEdge(bottomEdge));
            TypedParameter edgeParam = new TypedParameter(typeof(IAGSEdges), edges);
            TypedParameter idParam   = new TypedParameter(typeof(string), id);
            IRoom          room      = _resolver.Resolve <IRoom>(idParam, edgeParam);

            room.Viewport.Camera = _resolver.Resolve <ICamera>();
            IGameState state = _resolver.Resolve <IGameState>();

            room.Viewport.Camera.Target = () => state.Player;
            return(room);
        }