pir-serious-game-ethics/mini-game/scenes/decor/foreground.tscn
2021-04-08 12:17:48 +02:00

46 lines
1.1 KiB
Text

[gd_scene load_steps=6 format=2]
[ext_resource path="res://mini-game/scenes/decor/foreground.gd" type="Script" id=1]
[ext_resource path="res://mini-game/ressources/backgrounds/road3.png" type="Texture" id=2]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
uniform float scroll_speed;
void fragment(){
vec2 u = UV;
u.x += scroll_speed*TIME;
vec4 color = texture(TEXTURE,u);
COLOR = color;
}
"
[sub_resource type="ShaderMaterial" id=2]
shader = SubResource( 1 )
shader_param/scroll_speed = 0.0
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 552.889, 78.6175 )
[node name="foreground" type="Node2D"]
script = ExtResource( 1 )
[node name="TextureRect" type="TextureRect" parent="."]
material = SubResource( 2 )
margin_top = -356.0
margin_right = 1920.0
margin_bottom = 723.0
rect_scale = Vector2( 0.533, 0.913 )
texture = ExtResource( 2 )
stretch_mode = 2
__meta__ = {
"_edit_use_anchors_": false,
"_editor_description_": ""
}
[node name="StaticBody2D" type="StaticBody2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2( 497.671, 612.885 )
shape = SubResource( 3 )