Exemplo n.º 1
0
 public Services(IViewService view, IInputService input, IHudTextService hud, IPhysicService physic)
 {
     View          = view;
     inputService  = input;
     hudService    = hud;
     PhysicService = physic;
 }
Exemplo n.º 2
0
    public void ReplacePhysicService(IPhysicService newPhysicService)
    {
        var index     = MetaComponentsLookup.PhysicService;
        var component = (PhysicServiceComponent)CreateComponent(index, typeof(PhysicServiceComponent));

        component.PhysicService = newPhysicService;
        ReplaceComponent(index, component);
    }
Exemplo n.º 3
0
    public MetaEntity SetPhysicService(IPhysicService newPhysicService)
    {
        if (hasPhysicService)
        {
            throw new Entitas.EntitasException("Could not set PhysicService!\n" + this + " already has an entity with PhysicServiceComponent!",
                                               "You should check if the context already has a physicServiceEntity before setting it or use context.ReplacePhysicService().");
        }
        var entity = CreateEntity();

        entity.AddPhysicService(newPhysicService);
        return(entity);
    }
Exemplo n.º 4
0
    public void ReplacePhysicService(IPhysicService newPhysicService)
    {
        var entity = physicServiceEntity;

        if (entity == null)
        {
            entity = SetPhysicService(newPhysicService);
        }
        else
        {
            entity.ReplacePhysicService(newPhysicService);
        }
    }
 public RegisterPhysicServiceSystem(Contexts contexts, IPhysicService physicService)
 {
     _metaContext   = contexts.meta;
     _physicService = physicService;
 }