public IAGSEdges ToItem(AGSSerializationContext context) { AGSEdges edges = new AGSEdges(Left.ToItem(context), Right.ToItem(context), Top.ToItem(context), Bottom.ToItem(context)); return(edges); }
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); }
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; }
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); }