Пример #1
0
  @Override
  public void move(Vec2 delta) {
    this.pos.add(delta);

    center = Vec2.add(pos, Vec2.div(size, new Vec2(2, 2)));
  }
Пример #2
0
  public QuadCollider(Vec2 pos, Vec2 size) {
    this.pos = pos;
    this.size = size;

    center = Vec2.add(pos, Vec2.div(size, new Vec2(2, 2)));
  }