WeatherSystem

public class WeatherSystem

System for handling weather mechanics. Systems contain game logic that operates on entities with specific component types.

java.lang.Object > WeatherSystem

Field Summary

forcedWeather

final String forcedWeather

Field forcedWeather.

weatherTrackerComponent

final WeatherTracker weatherTrackerComponent

Field weatherTrackerComponent.

weatherResource

final WeatherResource weatherResource

Field weatherResource.

worldTimeResource

final WorldTimeResource worldTimeResource

Field worldTimeResource.

currentHour

final int currentHour

Field currentHour.

environmentWeather

final Int2IntMap environmentWeather

Field environmentWeather.

random

final ThreadLocalRandom random

Field random.

key

final String key

Field key.

index

final int index

Field index.

weatherForecast

final IWeightedMap weatherForecast

Field weatherForecast.

selectedWeatherIndex

final int selectedWeatherIndex

Field selectedWeatherIndex.

weatherResource2

final WeatherResource weatherResource2

Field weatherResource2.

playerRefComponent

final PlayerRef playerRefComponent

Field playerRefComponent.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

transitionSeconds

final float transitionSeconds

Field transitionSeconds.

Method Detail

WorldAddedSystem

public public WorldAddedSystem ()

Method WorldAddedSystem.

onSystemAddedToStore

public void onSystemAddedToStore (@Nonnull final Store store)

Method onSystemAddedToStore.

Parameters:
@Nonnull final Store store

onSystemRemovedFromStore

public void onSystemRemovedFromStore (@Nonnull final Store store)

Method onSystemRemovedFromStore.

Parameters:
@Nonnull final Store store

getQuery

public Query getQuery ()

Method getQuery.

onEntityAdd

public void onEntityAdd (@Nonnull final Holder holder, @Nonnull final AddReason reason, @Nonnull final Store store)

Method onEntityAdd.

Parameters:
@Nonnull final Holder holder
@Nonnull final AddReason reason
@Nonnull final Store store

onEntityRemoved

public void onEntityRemoved (@Nonnull final Holder holder, @Nonnull final RemoveReason reason, @Nonnull final Store store)

Method onEntityRemoved.

Parameters:
@Nonnull final Holder holder
@Nonnull final RemoveReason reason
@Nonnull final Store store

tick

public void tick (final float dt, final int systemIndex, @Nonnull final Store store)

Method tick.

Parameters:
final float dt
final int systemIndex
@Nonnull final Store store

isParallel

public boolean isParallel (final int archetypeChunkSize, final int taskCount)

Method isParallel.

Parameters:
final int archetypeChunkSize
final int taskCount

componentType

public Teleport> componentType ()

Method componentType.

onComponentAdded

public void onComponentAdded (@NonNullDecl final Ref ref, @NonNullDecl final Teleport component, @NonNullDecl final Store store, @NonNullDecl final CommandBuffer commandBuffer)

Method onComponentAdded.

Parameters:
@NonNullDecl final Ref ref
@NonNullDecl final Teleport component
@NonNullDecl final Store store
@NonNullDecl final CommandBuffer commandBuffer

onComponentSet

public void onComponentSet (@NonNullDecl final Ref ref, @NullableDecl final Teleport oldComponent, @NonNullDecl final Teleport newComponent, @NonNullDecl final Store store, @NonNullDecl final CommandBuffer commandBuffer)

Method onComponentSet.

Parameters:
@NonNullDecl final Ref ref
@NullableDecl final Teleport oldComponent
@NonNullDecl final Teleport newComponent
@NonNullDecl final Store store
@NonNullDecl final CommandBuffer commandBuffer

onComponentRemoved

public void onComponentRemoved (@NonNullDecl final Ref ref, @NonNullDecl final Teleport component, @NonNullDecl final Store store, @NonNullDecl final CommandBuffer commandBuffer)

Method onComponentRemoved.

Parameters:
@NonNullDecl final Ref ref
@NonNullDecl final Teleport component
@NonNullDecl final Store store
@NonNullDecl final CommandBuffer commandBuffer

getDependencies

public Set> getDependencies ()

Method getDependencies.

SystemDependency

public new SystemDependency (Order.AFTER, TeleportSystems.PlayerMoveSystem.class)

Method SystemDependency.

Parameters:
Order.AFTER Order.AFTER
TeleportSystems.PlayerMoveSystem.class TeleportSystems.PlayerMoveSystem.class