This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
Jessist/addons/godot-action/GDAction/Animating/ScaleBy/GDActionScaleBy.gd
2022-06-18 13:05:48 +02:00

23 lines
699 B
GDScript

class_name GDActionScaleBy extends GDActionInterval
var by_vector_scale: Vector2
func _init(by_vector_scale: Vector2, duration: float, gd_utils: Node).(duration, gd_utils):
self.by_vector_scale = by_vector_scale
func _create_action_node(key: String, node):
var action_node = GDActionNodeScaleBy.new(self, key, node)
action_node.time_func = time_func
action_node.ease_func_value = ease_func_value
return action_node
func _run_action(action_node: GDActionNode, delay: float, speed: float):
._run_action(action_node, delay, speed)
action_node.scale_by(by_vector_scale, duration, delay, speed)
func reversed() -> GDAction:
return get_script().new(-by_vector_scale, duration, _gd_utils)