mirror of
https://github.com/Yadciel1/2048-Shooter.git
synced 2024-12-26 14:57:02 +01:00
49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
[gd_scene load_steps=4 format=2]
|
|
|
|
[ext_resource path="res://box.png" type="Texture" id=1]
|
|
|
|
[sub_resource type="GDScript" id=3]
|
|
resource_name = "Bullet"
|
|
script/source = "extends KinematicBody2D
|
|
|
|
|
|
var velocity = Vector2(0,-1)
|
|
var speed = 300
|
|
var hit_power = 2
|
|
|
|
# Declare member variables here. Examples:
|
|
# var a = 2
|
|
# var b = \"text\"
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready():
|
|
pass # Replace with function body.
|
|
|
|
func _physics_process(delta):
|
|
move_and_collide(velocity.normalized() * delta * speed)
|
|
pass
|
|
"
|
|
|
|
[sub_resource type="RectangleShape2D" id=2]
|
|
extents = Vector2( 3.33333, 3.33333 )
|
|
|
|
[node name="Bullet" type="KinematicBody2D"]
|
|
scale = Vector2( 1.5, 1.5 )
|
|
z_index = 1
|
|
script = SubResource( 3 )
|
|
|
|
[node name="Sprite" type="Sprite" parent="."]
|
|
texture = ExtResource( 1 )
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
position = Vector2( 3.73522e-06, -3.41733e-06 )
|
|
scale = Vector2( 1.1, 1.1 )
|
|
shape = SubResource( 2 )
|
|
|
|
[node name="Area2D" type="Area2D" parent="." groups=["Bullet"]]
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
|
position = Vector2( 5.96046e-08, -5.96046e-08 )
|
|
shape = SubResource( 2 )
|