Exemplo n.º 1
0
  def __init__(self):
    self.speed = 5;
    self.speedZoom = .01;
    
    self.m_systemID = HashedString("RTSCameraSystem")

    #private final static List<HashedString> usedComponents;
    #private final static List<HashedString> optionalComponents;
    #private final static Set<HashedString> writeToComponents;
    #private final static Set<HashedString> otherComponents;
    #private final static Set<HashedString> usedInterfaces;
    #private final static Set<HashedString> writeToInterfaces;
  
  
    components = ArrayList()
    components.add(RTSCameraComponent.getComponentStaticType())
    self.m_usedComponents = Collections.unmodifiableList(components)
    
    components = ArrayList()
    components.add(CameraComponent.getComponentStaticType())
    self.m_optionalComponents = Collections.unmodifiableList(components)
    
    writes =  HashSet()
    writes.add(RTSCameraComponent.getComponentStaticType())
    writes.add(CameraComponent.getComponentStaticType())
    
    self.m_writeToComponents = Collections.unmodifiableSet(writes)
    
    self.m_otherComponents = Collections.emptySet()

    interfaces = HashSet()
    interfaces.add(SystemManager.inputInteface)
    self.m_usedInterfaces = Collections.unmodifiableSet(interfaces)
    self.m_writeToInterfaces = Collections.unmodifiableSet(HashSet(self.m_usedInterfaces))
Exemplo n.º 2
0
  def addEntity(self, entity, components, currentTime):
    
    assert SystemManager.assertSystemInputParameters(entity,  components, self)

    camera = components[0]
    
    cc = ENTITY_MANAGER.createComponent(entity, CameraComponent.getComponentStaticType())
    
    cc.init(camera.getCamera())