Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
36
scripts/backround_scenes_scripts/Stairs.gd
Normal file
36
scripts/backround_scenes_scripts/Stairs.gd
Normal file
|
@ -0,0 +1,36 @@
|
|||
extends Node2D
|
||||
const tweenTime = 1.2
|
||||
const waitTime = 0.6
|
||||
const startZoom = Vector2(0.6, 0.6)
|
||||
const step1Zoom = Vector2(0.7, 0.7)
|
||||
const step2Zoom = Vector2(0.8, 0.8)
|
||||
const step3Zoom = Vector2(0.9, 0.9)
|
||||
const endZoom = Vector2(1.0, 1.0)
|
||||
const start = Vector2(1060, 375)
|
||||
const step1 = Vector2(1035, 416)
|
||||
const step2 = Vector2(1010, 457)
|
||||
const step3 = Vector2(985, 498)
|
||||
const end = Vector2(960, 540)
|
||||
|
||||
func _ready():
|
||||
yield (get_tree().create_timer(0.7), "timeout")
|
||||
$Tween.interpolate_property($Camera2D, "offset", start, step1, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.interpolate_property($Camera2D, "zoom", startZoom, step1Zoom, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.start()
|
||||
yield ($Tween, "tween_all_completed")
|
||||
yield (get_tree().create_timer(waitTime), "timeout")
|
||||
$Tween.interpolate_property($Camera2D, "offset", step1, step2, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.interpolate_property($Camera2D, "zoom", step1Zoom, step2Zoom, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.start()
|
||||
yield ($Tween, "tween_all_completed")
|
||||
yield (get_tree().create_timer(waitTime), "timeout")
|
||||
$Tween.interpolate_property($Camera2D, "offset", step2, step3, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.interpolate_property($Camera2D, "zoom", step2Zoom, step3Zoom, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.start()
|
||||
yield ($Tween, "tween_all_completed")
|
||||
yield (get_tree().create_timer(waitTime), "timeout")
|
||||
$Tween.interpolate_property($Camera2D, "offset", step3, end, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.interpolate_property($Camera2D, "zoom", step3Zoom, endZoom, tweenTime, Tween.TRANS_LINEAR)
|
||||
$Tween.start()
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue