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

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. script = ExtResource( 1 )
  21. [node name="TextureRect" type="TextureRect" parent="."]
  22. material = SubResource( 2 )
  23. margin_right = 1920.0
  24. margin_bottom = 1080.0
  25. texture = ExtResource( 2 )
  26. stretch_mode = 2
  27. __meta__ = {
  28. "_edit_use_anchors_": false,
  29. "_editor_description_": ""
  30. }
  31. [node name="StaticBody2D" type="StaticBody2D" parent="."]
  32. [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
  33. position = Vector2( 960, 1080 )
  34. shape = SubResource( 3 )