DanielBullimore / OOmutiny

OO Javascript frontend
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

1.1 Interrupt #26

Closed DanielBullimore closed 4 years ago

DanielBullimore commented 5 years ago

Priority: [Unset]

Depends:

Description:

In short an interrupt object associates a function with a time or interval for it to be executed. There are two types of execution, act and solve. Act is executed on the main thread and is intended to make small immediate animations on the GUI. And solve which is intended to complete calculations and change object instance properties. Solve executions may implement web workers to calculate off the main thread.

UML:

oInterrupt-30-09-2019

Properties:

numCycles - public number, Set as the number of cycles to wait before executing interrupt.
booActOrSolve - public boolean, True = execute funAct() method after numCycles, False = execute funSolve() method after numCycles.
booRepeat - public boolean, True  = Continue to execute interrupt every numCycles, False = execute once only
numCycleCount - private number, used by Game loop to track cycles passes since interrupt was first create or executed.
numExecutions - public number, Used with booRepeat to control how many times to repeatedly execute the interrupt. 0 = execute every numCycles indefinitely.

Methods:

funAct() - void function interface, implementing developers to define this function in combination with booActOrSolve
funSolve() - void function interface, implementing developers to define this function in combination with boolActOrSolve
DanielBullimore commented 4 years ago

added numCycleCount for the loop to increment until it equals numCycles then executes. Might need it to implement the repeat interrupts Also added numExecutions so interrupt can execute a defined number of times then stop repeating.

oInterrupt-30-09-2019

DanielBullimore commented 4 years ago

Sanity Checking...

funAct() - void function handle, implementing developers to set this function in combination with booActOrSolve funSolve() - void function handle, implementing developers to set this function in combination with boolActOrSolve

these are called interfaces, correcting.

Pass