@Override public boolean equals(final Object o) { return this == o || o instanceof BaseEntity && this.id.equals(((BaseEntity) o).id); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } EntityHitDto that = (EntityHitDto) o; if (hitPoint != that.hitPoint) { return false; } return entity.equals(that.entity); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } WaitingEntity that = (WaitingEntity) o; return entity.equals(that.entity) && representation.equals(that.representation) && builderId.equals(that.builderId); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ActionDto actionDto = (ActionDto) o; return id.equals(actionDto.id) && entity.equals(actionDto.entity); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ResourceValueDto that = (ResourceValueDto) o; return time == that.time && cityId.equals(that.cityId) && resources.equals(that.resources); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ChangeOwnerDto that = (ChangeOwnerDto) o; if (!entity.equals(that.entity)) { return false; } return newOwnerId.equals(that.newOwnerId); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } StaffAllocationDto that = (StaffAllocationDto) o; return cityId.equals(that.cityId) && position.equals(that.position) && staff.equals(that.staff); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } EntityPositionDto that = (EntityPositionDto) o; return id.equals(that.id) && position.equals(that.position) && orientation.equals(that.orientation); }
@Override public Optional<EntityId> getEntity(final float x, final float y) { final float screenX = x / this.resolutionX; final float screenY = y / this.resolutionY; EntityId id = EntityId.valueOf(this.jni.throwRay(this.pointer.getPointerAddress(), screenX, screenY, false)); if (id.equals(EntityId.WORLD)) { return Optional.empty(); } return Optional.of(id); }
/** * Full constructor. * * @param associatedId Object unique id. * @param ogreEntity Ogre entity. */ protected OgreObject(final EntityId associatedId, final OgreEntity ogreEntity) { super(); this.id = associatedId; this.node = ogreEntity.getNode(); this.entity = ogreEntity; if (this.id.equals(EntityId.WORLD)) { this.setUnpickable(); } }
@Override public void entityComplete(final EntityId entity, PlayerId owner, EntityType type, final EntityId builder, final int index) { if (builder.equals(EntityId.WORLD)) { return; } this.builderManager.getBuilderById(builder).ifPresent(b -> { b.removeFromQueue(index); if (!b.getQueue().isEmpty()) { R nextToBuild = b.getQueue().getList().get(0); listeners.forEach(l -> l.add(nextToBuild, b.getOwner(), builder)); } listeners.forEach(l -> l.notify(b.getQueue())); }); }