예제 #1
0
  @Override
  public Entity putItem(float x, float y) {
    LightVO vo = new LightVO();
    vo.type = LightVO.LightType.POINT;
    vo.distance = 300 / sandbox.getPixelPerWU();

    return ItemFactory.get().createLightItem(vo, new Vector2(x, y));
  }
예제 #2
0
  @Override
  public Entity putItem(float x, float y) {
    // LayerItemVO layer = Sandbox.getInstance().getItemFactory().getSelectedLayer();
    LightVO vo = new LightVO();
    vo.type = LightVO.LightType.CONE;
    vo.distance = 300;
    vo.coneDegree = 45;

    return ItemFactory.get().createLightItem(vo, new Vector2(x, y));
  }
예제 #3
0
파일: LightActor.java 프로젝트: derptoy/ogm
  public void updateDataVO() {
    dataVO.distance = (int) lightObject.getDistance();
    dataVO.directionDegree = direction;

    if (dataVO.type == LightType.CONE) {
      dataVO.coneDegree = ((ConeLight) lightObject).getConeDegree();
    }

    dataVO.x = getX() / this.mulX;
    dataVO.y = getY() / this.mulY;

    if (dataVO.layerName == null || dataVO.layerName.equals("")) {
      dataVO.layerName = "Default";
    }

    dataVO.customVars = customVariables.saveAsString();
  }