mirror of
https://github.com/RYGhub/the-cold-night.git
synced 2024-11-21 20:24:20 +00:00
✏️ First versions of arrow and branch
also attached to relative sprite
This commit is contained in:
parent
948405ddd5
commit
9c2ea42450
8 changed files with 91 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://src/mechanics/White.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/mechanics/Arrow.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/entities/behaviours/BulletMovement.gd" type="Script" id=2]
|
||||
[ext_resource path="res://src/entities/behaviours/Ownership.tscn" type="PackedScene" id=3]
|
||||
[ext_resource path="res://src/entities/Bullet.gd" type="Script" id=4]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
extends Area2D
|
||||
|
||||
|
||||
export var sprite: Texture = preload("res://src/mechanics/White.png") setget set_sprite, get_sprite
|
||||
export var sprite: Texture = preload("res://src/mechanics/Branch1.png") setget set_sprite, get_sprite
|
||||
export var duration_seconds: float = 1.0 setget set_duration, get_duration
|
||||
export var despawn_seconds: float = INF setget set_despawn, get_despawn
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=4 format=2]
|
||||
[gd_scene load_steps=5 format=2]
|
||||
|
||||
[ext_resource path="res://src/mechanics/White.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/mechanics/Branch1.png" type="Texture" id=1]
|
||||
[ext_resource path="res://src/entities/Pickup.gd" type="Script" id=2]
|
||||
[ext_resource path="res://src/entities/behaviours/SpriteRandomRotation.gd" type="Script" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 16, 16 )
|
||||
|
@ -15,13 +16,13 @@ shape = SubResource( 1 )
|
|||
|
||||
[node name="Sprite" type="Sprite" parent="Shape"]
|
||||
texture = ExtResource( 1 )
|
||||
script = ExtResource( 3 )
|
||||
|
||||
[node name="Duration" type="Timer" parent="."]
|
||||
one_shot = true
|
||||
|
||||
[node name="Despawn" type="Timer" parent="."]
|
||||
one_shot = true
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="timeout" from="Duration" to="." method="_on_Duration_timeout"]
|
||||
[connection signal="timeout" from="Despawn" to="." method="_on_Despawn_timeout"]
|
||||
|
|
11
src/entities/behaviours/SpriteRandomRotation.gd
Normal file
11
src/entities/behaviours/SpriteRandomRotation.gd
Normal file
|
@ -0,0 +1,11 @@
|
|||
extends Sprite
|
||||
|
||||
var rng : RandomNumberGenerator = RandomNumberGenerator.new()
|
||||
|
||||
func _ready():
|
||||
rng.randomize()
|
||||
self.rotate(rng.randf_range(0,360))
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
BIN
src/mechanics/Arrow.png
(Stored with Git LFS)
Normal file
BIN
src/mechanics/Arrow.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
src/mechanics/Arrow.png.import
Normal file
34
src/mechanics/Arrow.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Arrow.png-c74a2890a5d000583b97def8c477171b.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/mechanics/Arrow.png"
|
||||
dest_files=[ "res://.import/Arrow.png-c74a2890a5d000583b97def8c477171b.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
BIN
src/mechanics/Branch1.png
(Stored with Git LFS)
Normal file
BIN
src/mechanics/Branch1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
src/mechanics/Branch1.png.import
Normal file
34
src/mechanics/Branch1.png.import
Normal file
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/Branch1.png-99f09072e85d1a5bd66b495d591945f1.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://src/mechanics/Branch1.png"
|
||||
dest_files=[ "res://.import/Branch1.png-99f09072e85d1a5bd66b495d591945f1.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=true
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Loading…
Reference in a new issue