Exemplo n.º 1
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));
  }
Exemplo n.º 2
0
  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();
  }