gd: added input addon
This commit is contained in:
10
guide_examples/top_down_shooter/bolt/bolt.gd
Normal file
10
guide_examples/top_down_shooter/bolt/bolt.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends Sprite2D
|
||||
|
||||
@export var speed:float = 500
|
||||
@export var lifetime:float = 1.0
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
position += transform.x * delta * speed
|
||||
lifetime -= delta
|
||||
if lifetime <= 0:
|
||||
queue_free()
|
1
guide_examples/top_down_shooter/bolt/bolt.gd.uid
Normal file
1
guide_examples/top_down_shooter/bolt/bolt.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://w7nan374op8
|
BIN
guide_examples/top_down_shooter/bolt/bolt.png
Normal file
BIN
guide_examples/top_down_shooter/bolt/bolt.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
34
guide_examples/top_down_shooter/bolt/bolt.png.import
Normal file
34
guide_examples/top_down_shooter/bolt/bolt.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dfpdumvnepffe"
|
||||
path="res://.godot/imported/bolt.png-d2b4175f016737de6380cafdf09c07c0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://guide_examples/top_down_shooter/bolt/bolt.png"
|
||||
dest_files=["res://.godot/imported/bolt.png-d2b4175f016737de6380cafdf09c07c0.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
10
guide_examples/top_down_shooter/bolt/bolt.tscn
Normal file
10
guide_examples/top_down_shooter/bolt/bolt.tscn
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c0fqv8e3tljmp"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dfpdumvnepffe" path="res://guide_examples/top_down_shooter/bolt/bolt.png" id="1_b5s4m"]
|
||||
[ext_resource type="Script" path="res://guide_examples/top_down_shooter/bolt/bolt.gd" id="2_o61jt"]
|
||||
|
||||
[node name="Bolt" type="Sprite2D"]
|
||||
texture = ExtResource("1_b5s4m")
|
||||
script = ExtResource("2_o61jt")
|
||||
speed = 1000.0
|
||||
lifetime = 2.0
|
Reference in New Issue
Block a user