No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

foreground.tscn 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. [gd_scene load_steps=6 format=2]
  2. [ext_resource path="res://mini-game/scenes/decor/foreground.gd" type="Script" id=1]
  3. [ext_resource path="res://mini-game/ressources/backgrounds/road3.png" type="Texture" id=2]
  4. [sub_resource type="Shader" id=1]
  5. code = "shader_type canvas_item;
  6. uniform float scroll_speed;
  7. void fragment(){
  8. vec2 u = UV;
  9. u.x += scroll_speed*TIME;
  10. vec4 color = texture(TEXTURE,u);
  11. COLOR = color;
  12. }
  13. "
  14. [sub_resource type="ShaderMaterial" id=2]
  15. shader = SubResource( 1 )
  16. shader_param/scroll_speed = 0.0
  17. [sub_resource type="RectangleShape2D" id=3]
  18. extents = Vector2( 958.398, 78.6175 )
  19. [node name="foreground" type="Node2D"]
  20. pause_mode = 2
  21. script = ExtResource( 1 )
  22. [node name="TextureRect" type="TextureRect" parent="."]
  23. material = SubResource( 2 )
  24. margin_right = 1920.0
  25. margin_bottom = 1080.0
  26. texture = ExtResource( 2 )
  27. stretch_mode = 2
  28. __meta__ = {
  29. "_edit_use_anchors_": false,
  30. "_editor_description_": ""
  31. }
  32. [node name="StaticBody2D" type="StaticBody2D" parent="."]
  33. [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
  34. position = Vector2( 960, 1080 )
  35. shape = SubResource( 3 )