StartSlumberSystem

public class StartSlumberSystem extends DelayedSystem

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

java.lang.Object > DelayedSystem > StartSlumberSystem

Field Summary

world

final World world

Field world.

playerRefs

final Collection playerRefs

Field playerRefs.

wakeUpHour

final float wakeUpHour

Field wakeUpHour.

worldSomnolence

final WorldSomnolence worldSomnolence

Field worldSomnolence.

worldState

final WorldSleep worldState

Field worldState.

timeResource

final WorldTimeResource timeResource

Field timeResource.

now

final Instant now

Field now.

target

final Instant target

Field target.

irlSeconds

final float irlSeconds

Field irlSeconds.

ref

final Ref ref

Field ref.

ldt

final LocalDateTime ldt

Field ldt.

hours

final int hours

Field hours.

fractionalHour

final float fractionalHour

Field fractionalHour.

ms

final long ms

Field ms.

seconds

final double seconds

Field seconds.

somnolence

final PlayerSomnolence somnolence

Field somnolence.

sleepState2

final PlayerSleep sleepState2

Field sleepState2.

sleepState

final PlayerSleep sleepState

Field sleepState.

slumber2

final PlayerSleep.Slumber slumber2

Field slumber2.

fullyAwake

final PlayerSleep.FullyAwake fullyAwake

Field fullyAwake.

morningWakeUp

final PlayerSleep.MorningWakeUp morningWakeUp

Field morningWakeUp.

worldTimeResource

final WorldTimeResource worldTimeResource

Field worldTimeResource.

readyTime

final Instant readyTime

Field readyTime.

noddingOff

final PlayerSleep.NoddingOff noddingOff

Field noddingOff.

sleepStart

final Instant sleepStart

Field sleepStart.

slumber

final PlayerSleep.Slumber slumber

Field slumber.

handle

final MethodHandle handle

Field handle.

Method Detail

StartSlumberSystem

public public StartSlumberSystem ()

Method StartSlumberSystem.

delayedTick

public void delayedTick (final float dt, final int systemIndex, @NonNullDecl final Store store)

Method delayedTick.

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

checkIfEveryoneIsReadyToSleep

private void checkIfEveryoneIsReadyToSleep (final Store store)

Method checkIfEveryoneIsReadyToSleep.

Parameters:
final Store store

WorldSlumber

public new WorldSlumber (now, target, irlSeconds)

Method WorldSlumber.

Parameters:
now now
target target
irlSeconds irlSeconds

computeWakeupInstant

private Instant computeWakeupInstant (final Instant now, final float wakeUpHour)

Method computeWakeupInstant.

Parameters:
final Instant now
final float wakeUpHour

computeIrlSeconds

static float computeIrlSeconds (final Instant startInstant, final Instant targetInstant)

Method computeIrlSeconds.

Parameters:
final Instant startInstant
final Instant targetInstant

isEveryoneReadyToSleep

private boolean isEveryoneReadyToSleep (final ComponentAccessor store)

Method isEveryoneReadyToSleep.

Parameters:
final ComponentAccessor store

isReadyToSleep

static boolean isReadyToSleep (final ComponentAccessor store, final Ref ref)

Method isReadyToSleep.

Parameters:
final ComponentAccessor store
final Ref ref

switch

public return switch (/* invokedynamic(!)

Method switch.

Parameters:
/* invokedynamic(!

handle

static MethodHandle handle ()

Method handle.

ensureHandle

static MethodHandle ensureHandle ()

Method ensureHandle.

invoke

static int invoke (Object p0, int p1)

Method invoke.

Parameters:
Object p0
int p1