diff options
| author | arngo <[email protected]> | 2021-12-23 01:04:59 -0500 |
|---|---|---|
| committer | arngo <[email protected]> | 2021-12-23 01:04:59 -0500 |
| commit | 8116ce1f56aaf5344596ca16177c7abff11b1496 (patch) | |
| tree | ac0b5e048f6b056129b01439fb20b89861efeee5 /app/tick.rb | |
| parent | b567c7ceb887a8da73a8e2c1015a7638ca1f8fad (diff) | |
| download | SteelWings-8116ce1f56aaf5344596ca16177c7abff11b1496.tar.gz SteelWings-8116ce1f56aaf5344596ca16177c7abff11b1496.zip | |
implement ai components/systems
Diffstat (limited to 'app/tick.rb')
| -rw-r--r-- | app/tick.rb | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/app/tick.rb b/app/tick.rb index f994d5a..901a538 100644 --- a/app/tick.rb +++ b/app/tick.rb @@ -4,9 +4,29 @@ #@pause = false @camera = FF::Cmp::SingletonCamera[0] - +@scatter = false +@target = true +@timer = 0 FF::Sys::InitTitleScreen.call def tick args + #puts @timer + @timer += 1 + if @timer >= 100 && !FF::Cmp::SingletonTitle[0].title_screen + @timer -= 100 + puts "scatter: #{@scatter}" + puts "target: #{@target}" + @scatter = !@scatter + if @scatter + FF::Sys::Scatter.call + elsif @target + @target = false + FF::Sys::Rejoin.call + else + @target = true + FF::Sys::TargetPlayer.call + end + end + args.outputs.background_color = [0,0,0] args.outputs.solids << [-10_000, -10_000, 20_000, 20_000, 223, 246, 245] |
