Compare commits
No commits in common. "ff8c3ef75220f9bbee6b5e69a33d8e46954f6690" and "5438bc9ffdb4c1f788dc93213e7692933491760a" have entirely different histories.
ff8c3ef752
...
5438bc9ffd
|
@ -9,26 +9,11 @@ var target: Targetable = null
|
|||
|
||||
var camera_tweening = false
|
||||
|
||||
var time_targets := Dictionary()
|
||||
|
||||
func _ready():
|
||||
set_target(initial_target, false)
|
||||
camera.set_as_top_level(true)
|
||||
ControllerEventBus.billiard_touched_billiard.connect(_on_billiard_touched_billiard)
|
||||
|
||||
TAS_System.FrameIncremented.connect(frame_inc)
|
||||
TAS_System.FramesAdvanced.connect(frames_change)
|
||||
TAS_System.FramesRegressed.connect(frames_change)
|
||||
|
||||
func frame_inc(frame: int):
|
||||
time_targets[frame] = target
|
||||
|
||||
func frames_change(start: int, end: int):
|
||||
if time_targets[end] != target:
|
||||
set_target(time_targets[end].get_billiard())
|
||||
|
||||
|
||||
|
||||
func _on_billiard_touched_billiard(who: Billiard, touched: Billiard):
|
||||
var who_target = Targetable.is_targetable(who)
|
||||
if who_target != target or who.can_hit:
|
||||
|
@ -86,8 +71,8 @@ func release():
|
|||
%ChargeReleaseSound.volume_db = get_charge() * 12
|
||||
%ChargeReleaseSound.play()
|
||||
var billiard := target.get_billiard()
|
||||
TAS_System.StartIncrementingFrames()
|
||||
billiard.hit((target.global_position - %camera_spot.global_position).normalized(), get_charge())
|
||||
TAS_System.StartIncrementingFrames()
|
||||
|
||||
%radial_ui.set_charge(0.0)
|
||||
%ChargeSound.stop()
|
||||
|
|
Loading…
Reference in New Issue