Initial Android commit
This commit is contained in:
commit
1e2b80c13d
8521 changed files with 231475 additions and 0 deletions
40
scripts/backround_scenes_scripts/Scene8.gd
Normal file
40
scripts/backround_scenes_scripts/Scene8.gd
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
extends Node2D
|
||||
|
||||
onready var light1 = $Lights / Light2D;
|
||||
onready var light2 = $Lights / Light2D2
|
||||
var maxEnergy = 2.5
|
||||
var minEnergy = 1.0
|
||||
var timeFactor = 3.5
|
||||
var isIncreasing;
|
||||
|
||||
func _ready():
|
||||
light1.energy = maxEnergy
|
||||
isIncreasing = false
|
||||
|
||||
var windowSize = SettingsSingleton.GetCurrectScreenResolutionVector2();
|
||||
|
||||
$Cloud1.position = Vector2( - 500, - windowSize.y * 0.1)
|
||||
$Cloud2.position = Vector2(0, - windowSize.y * 0.35)
|
||||
|
||||
GallerySingleton.AddBackground("Scene8")
|
||||
|
||||
|
||||
|
||||
func _process(delta):
|
||||
|
||||
if (isIncreasing):
|
||||
light1.energy += delta / timeFactor;
|
||||
if light1.energy > maxEnergy:
|
||||
light1.energy = maxEnergy
|
||||
isIncreasing = false
|
||||
elif ( not isIncreasing):
|
||||
light1.energy -= delta / timeFactor;
|
||||
if light1.energy < minEnergy:
|
||||
light1.energy = minEnergy
|
||||
isIncreasing = true
|
||||
|
||||
func InitForGallery()->Array:
|
||||
for i in get_children():
|
||||
if i is Node2D:
|
||||
i.scale = Vector2(0.5, 0.5)
|
||||
return [];
|
||||
Loading…
Add table
Add a link
Reference in a new issue