first Prototype
This commit is contained in:
parent
89503407e7
commit
c887a2168c
78 changed files with 2494 additions and 2 deletions
17
scenes/spaceShip/timeGhost/timeghost.gd
Normal file
17
scenes/spaceShip/timeGhost/timeghost.gd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class_name TimeGhost extends "res://scenes/spaceShip/spaceShip.gd"
|
||||
|
||||
@export var spaceShip: Spaceship = null
|
||||
|
||||
#func _init(_speed: int, _acceleration: float) -> void:
|
||||
# speed = _speed
|
||||
#acceleration = _acceleration
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
move_and_slide()
|
||||
|
||||
func setSpaceship(_spaceShip: Spaceship):
|
||||
spaceShip = _spaceShip
|
||||
speed = spaceShip.speed
|
||||
acceleration = spaceShip.acceleration
|
||||
global_position = spaceShip.global_position
|
||||
sprite.texture = spaceShip.sprite.texture
|
||||
1
scenes/spaceShip/timeGhost/timeghost.gd.uid
Normal file
1
scenes/spaceShip/timeGhost/timeghost.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://m3hn5tl2nidk
|
||||
33
scenes/spaceShip/timeGhost/timeghost.tscn
Normal file
33
scenes/spaceShip/timeGhost/timeghost.tscn
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://dms0cw7opfd64"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://csacin2gx2tum" path="res://scenes/spaceShip/spaceShip.tscn" id="1_bm7fr"]
|
||||
[ext_resource type="Script" uid="uid://m3hn5tl2nidk" path="res://scenes/spaceShip/timeGhost/timeghost.gd" id="2_57067"]
|
||||
[ext_resource type="PackedScene" uid="uid://eqo7k2ronf8k" path="res://scenes/areas/damageArea/damageArea.tscn" id="3_5nmba"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5nmba"]
|
||||
size = Vector2(50, 50)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_m3s7j"]
|
||||
size = Vector2(50, 50)
|
||||
|
||||
[node name="Timeghost" groups=["timeGhost"] instance=ExtResource("1_bm7fr")]
|
||||
modulate = Color(0, 1, 1, 1)
|
||||
collision_layer = 20
|
||||
script = ExtResource("2_57067")
|
||||
invincible = true
|
||||
|
||||
[node name="CollisionShape2D" parent="." index="0"]
|
||||
shape = SubResource("RectangleShape2D_5nmba")
|
||||
disabled = true
|
||||
|
||||
[node name="hurtArea" parent="." index="1"]
|
||||
visible = false
|
||||
|
||||
[node name="DamageArea" parent="." index="4" instance=ExtResource("3_5nmba")]
|
||||
damage = 10
|
||||
|
||||
[node name="CollisionShape2D" parent="DamageArea" index="0"]
|
||||
shape = SubResource("RectangleShape2D_m3s7j")
|
||||
disabled = true
|
||||
|
||||
[editable path="DamageArea"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue