initial commit
4
.editorconfig
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
2
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Normalize EOL for all files that Git considers text files.
|
||||
* text=auto eol=lf
|
||||
17
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
/android/
|
||||
|
||||
# Godot-specific ignores
|
||||
.import/
|
||||
export.cfg
|
||||
export_credentials.cfg
|
||||
*.tmp
|
||||
|
||||
# Imported translations (automatically generated from CSV files)
|
||||
*.translation
|
||||
|
||||
# Mono-specific ignores
|
||||
.mono/
|
||||
data_*/
|
||||
mono_crash.*.json
|
||||
BIN
Characters/Ships/cannon.png
Normal file
|
After Width: | Height: | Size: 507 B |
40
Characters/Ships/cannon.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bfasty7u5jibk"
|
||||
path="res://.godot/imported/cannon.png-dc15436d4132d6e7a169752927a26cbd.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Characters/Ships/cannon.png"
|
||||
dest_files=["res://.godot/imported/cannon.png-dc15436d4132d6e7a169752927a26cbd.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
Characters/Ships/cannonLoose.png
Normal file
|
After Width: | Height: | Size: 394 B |
40
Characters/Ships/cannonLoose.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bu2uf2i2gaybu"
|
||||
path="res://.godot/imported/cannonLoose.png-fcbe3c8c5f0142c69c1c5b26eefaad6d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Characters/Ships/cannonLoose.png"
|
||||
dest_files=["res://.godot/imported/cannonLoose.png-fcbe3c8c5f0142c69c1c5b26eefaad6d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
Characters/Ships/pirate_ships.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
40
Characters/Ships/pirate_ships.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dani7ta4kpqva"
|
||||
path="res://.godot/imported/pirate_ships.png-251b8d05dece67264077136b4d18990d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Characters/Ships/pirate_ships.png"
|
||||
dest_files=["res://.godot/imported/pirate_ships.png-251b8d05dece67264077136b4d18990d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
Characters/Ships/player_ship.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
40
Characters/Ships/player_ship.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://83sv1yu3pkya"
|
||||
path="res://.godot/imported/player_ship.png-e3cdd6a26359a0a84ebf04a818419ad8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Characters/Ships/player_ship.png"
|
||||
dest_files=["res://.godot/imported/player_ship.png-e3cdd6a26359a0a84ebf04a818419ad8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
54
Characters/pirate.gd
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
extends RigidBody2D
|
||||
|
||||
# Paramètres ajustables
|
||||
@export var speed: float = 150.0
|
||||
@export var shoot_range: float = 300.0 # Distance minimale pour tirer
|
||||
@export var shoot_cooldown: float = 1.5 # Délai entre les tirs
|
||||
@export var bullet_scene: PackedScene # Scène de la balle (à assigner dans l'inspecteur)
|
||||
@export var shoot_angle_variation: float = 15.0 # Variation en degrés
|
||||
|
||||
@onready var shoot_timer = $ShootTimer
|
||||
@onready var player = null # Référence au joueur, à assigner via code ou groupe
|
||||
|
||||
func _ready():
|
||||
# Trouve le joueur (suppose qu'il est dans le groupe "players")
|
||||
var players = get_tree().get_nodes_in_group("players")
|
||||
if players.size() > 0:
|
||||
player = players[0]
|
||||
shoot_timer.timeout.connect(_on_shoot_timer_timeout)
|
||||
|
||||
func _physics_process(_delta: float):
|
||||
if player:
|
||||
if position.distance_to(player.position) < shoot_range:
|
||||
look_at(player.position) # Oriente le bateau vers le joueur
|
||||
if shoot_timer.is_stopped():
|
||||
shoot_timer.start(shoot_cooldown)
|
||||
else:
|
||||
# Direction vers le joueur
|
||||
var direction = (player.position - position).normalized()
|
||||
# Applique une force pour se déplacer
|
||||
apply_central_force(direction * speed)
|
||||
|
||||
|
||||
func _on_shoot_timer_timeout():
|
||||
if player:
|
||||
_shoot()
|
||||
|
||||
func _shoot():
|
||||
# Crée une balle
|
||||
var bullet = bullet_scene.instantiate()
|
||||
# Position devant le bateau
|
||||
bullet.position = position + global_transform.x * 100.0 # 50 pixels devant
|
||||
# Rotation avec variation aléatoire
|
||||
var angle_rad = deg_to_rad(randf_range(-shoot_angle_variation, shoot_angle_variation))
|
||||
#bullet.rotation = rotation + angle_rad
|
||||
bullet.rotation = self.rotation + angle_rad
|
||||
# Ajoute la balle à la scène
|
||||
get_parent().add_child(bullet)
|
||||
|
||||
# Fonction pour convertir les degrés en radians
|
||||
func deg_to_rad(degrees: float) -> float:
|
||||
return degrees * PI / 180.0
|
||||
|
||||
func take_damage(_damage : float):
|
||||
queue_free()
|
||||
1
Characters/pirate.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dtxvik61iarsj
|
||||
31
Characters/pirate.tscn
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://mh40qx1bhgs5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dtxvik61iarsj" path="res://Characters/pirate.gd" id="1_afkof"]
|
||||
[ext_resource type="Texture2D" uid="uid://dani7ta4kpqva" path="res://Characters/Ships/pirate_ships.png" id="1_u2x3i"]
|
||||
[ext_resource type="PackedScene" uid="uid://ngrscx1l0dn5" path="res://GPE/CannonBall/cannon_ball.tscn" id="2_gsuw1"]
|
||||
[ext_resource type="Texture2D" uid="uid://bu2uf2i2gaybu" path="res://Characters/Ships/cannonLoose.png" id="2_h5orw"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_h5orw"]
|
||||
radius = 39.0
|
||||
height = 136.0
|
||||
|
||||
[node name="Pirate" type="RigidBody2D"]
|
||||
gravity_scale = 0.0
|
||||
linear_damp = 0.5
|
||||
script = ExtResource("1_afkof")
|
||||
bullet_scene = ExtResource("2_gsuw1")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = -1.5707964
|
||||
shape = SubResource("CapsuleShape2D_h5orw")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
rotation = -1.5707964
|
||||
texture = ExtResource("1_u2x3i")
|
||||
|
||||
[node name="Sprite2D2" type="Sprite2D" parent="Sprite2D"]
|
||||
position = Vector2(0, 35)
|
||||
rotation = 1.5707964
|
||||
texture = ExtResource("2_h5orw")
|
||||
|
||||
[node name="ShootTimer" type="Timer" parent="."]
|
||||
41
Characters/player.gd
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
extends Area2D
|
||||
|
||||
@export var speed = 400
|
||||
@export var score : int = 0
|
||||
@export var bullet_scene: PackedScene
|
||||
|
||||
var screen_size
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
screen_size = get_viewport_rect().size
|
||||
$ShootTimer.timeout.connect(_on_shoot_timer_timeout)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
var velocity = Vector2.ZERO # The player's movement vector.
|
||||
if Input.is_action_pressed("move_right"):
|
||||
velocity.x += 1
|
||||
if Input.is_action_pressed("move_left"):
|
||||
velocity.x -= 1
|
||||
if Input.is_action_pressed("move_down"):
|
||||
velocity.y += 1
|
||||
if Input.is_action_pressed("move_up"):
|
||||
velocity.y -= 1
|
||||
if velocity.length() > 0:
|
||||
velocity = velocity.normalized() * speed
|
||||
rotation = velocity.angle() #velocity.angle() + PI/2
|
||||
position += velocity * delta
|
||||
#position = position.clamp(Vector2.ZERO, screen_size)
|
||||
|
||||
func _on_shoot_timer_timeout():
|
||||
_shoot(Vector2(0, 80))
|
||||
_shoot(Vector2(0, -80))
|
||||
|
||||
func _shoot(socket : Vector2):
|
||||
var bullet = bullet_scene.instantiate()
|
||||
bullet.position = position + socket.rotated(self.rotation)
|
||||
bullet.rotation = self.rotation + PI/2 * sign(socket.y)
|
||||
get_parent().add_child(bullet)
|
||||
|
||||
1
Characters/player.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://doegfk88vnwo1
|
||||
43
Characters/player.tscn
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://ifus76ia8xws"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://83sv1yu3pkya" path="res://Characters/Ships/player_ship.png" id="1_5mj4t"]
|
||||
[ext_resource type="Script" uid="uid://doegfk88vnwo1" path="res://Characters/player.gd" id="1_eovys"]
|
||||
[ext_resource type="PackedScene" uid="uid://ngrscx1l0dn5" path="res://GPE/CannonBall/cannon_ball.tscn" id="2_65n15"]
|
||||
[ext_resource type="PackedScene" uid="uid://c2pruida0t5o0" path="res://Player/hud.tscn" id="3_vb825"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_eovys"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_5mj4t")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_vb825"]
|
||||
radius = 37.0
|
||||
height = 118.0
|
||||
|
||||
[node name="Player" type="Area2D" groups=["players"]]
|
||||
script = ExtResource("1_eovys")
|
||||
bullet_scene = ExtResource("2_65n15")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
rotation = -1.5707964
|
||||
sprite_frames = SubResource("SpriteFrames_eovys")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
rotation = -1.5707964
|
||||
shape = SubResource("CapsuleShape2D_vb825")
|
||||
|
||||
[node name="CanvasLayer" parent="." instance=ExtResource("3_vb825")]
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
drag_horizontal_enabled = true
|
||||
drag_vertical_enabled = true
|
||||
|
||||
[node name="ShootTimer" type="Timer" parent="."]
|
||||
autostart = true
|
||||
BIN
GPE/CannonBall/cannonBall.png
Normal file
|
After Width: | Height: | Size: 290 B |
40
GPE/CannonBall/cannonBall.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://6hx4g1df1di4"
|
||||
path="res://.godot/imported/cannonBall.png-20ae8c138ccee3b0dfc31c48c762291f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GPE/CannonBall/cannonBall.png"
|
||||
dest_files=["res://.godot/imported/cannonBall.png-20ae8c138ccee3b0dfc31c48c762291f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
19
GPE/CannonBall/cannon_ball.gd
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
extends Area2D
|
||||
|
||||
|
||||
|
||||
@export var speed: float = 200.0
|
||||
@export var damage: int = 10
|
||||
|
||||
func _ready():
|
||||
# Déplace la balle dans la direction de sa rotation
|
||||
#var velocity = Vector2(speed, 0).rotated(rotation)
|
||||
connect("body_entered", _on_body_entered)
|
||||
|
||||
func _physics_process(delta: float):
|
||||
position += Vector2(speed, 0).rotated(rotation) * delta
|
||||
|
||||
func _on_body_entered(body):
|
||||
if body.has_method("take_damage"):
|
||||
body.take_damage(damage)
|
||||
queue_free()
|
||||
1
GPE/CannonBall/cannon_ball.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bp7a1qram84x3
|
||||
16
GPE/CannonBall/cannon_ball.tscn
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://ngrscx1l0dn5"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://6hx4g1df1di4" path="res://GPE/CannonBall/cannonBall.png" id="1_f08vj"]
|
||||
[ext_resource type="Script" uid="uid://bp7a1qram84x3" path="res://GPE/CannonBall/cannon_ball.gd" id="1_u2lho"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_u2lho"]
|
||||
radius = 5.0
|
||||
|
||||
[node name="CannonBall" type="Area2D"]
|
||||
script = ExtResource("1_u2lho")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_u2lho")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_f08vj")
|
||||
37
GPE/CannonBall/cannon_balll_old.tscn
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://drpe7vgdqqyh4"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://6hx4g1df1di4" path="res://GPE/CannonBall/cannonBall.png" id="2_so0x5"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_3iblm"]
|
||||
script/source = "extends RigidBody2D
|
||||
|
||||
@export var speed: float = 150.0
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
func _physics_process(delta: float):
|
||||
apply_central_force(Vector2(speed, 0).rotated(rotation))
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
"
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_orehy"]
|
||||
radius = 5.0
|
||||
|
||||
[node name="RigidBody2D" type="RigidBody2D"]
|
||||
gravity_scale = 0.0
|
||||
script = SubResource("GDScript_3iblm")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_orehy")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_so0x5")
|
||||
|
||||
[node name="Sprite2D2" type="Sprite2D" parent="Sprite2D"]
|
||||
position = Vector2(9, 0)
|
||||
texture = ExtResource("2_so0x5")
|
||||
BIN
GPE/Coin/coin-64x64.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
40
GPE/Coin/coin-64x64.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cy1umt0i3b0jq"
|
||||
path="res://.godot/imported/coin-64x64.png-5e5122687a858ab07d0280d93d0d9532.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GPE/Coin/coin-64x64.png"
|
||||
dest_files=["res://.godot/imported/coin-64x64.png-5e5122687a858ab07d0280d93d0d9532.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
16
GPE/Coin/coin.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
extends Area2D
|
||||
|
||||
func _ready():
|
||||
# Connecte le signal de collision
|
||||
#connect("body_entered", _on_body_entered)
|
||||
connect("area_entered", _on_body_entered)
|
||||
|
||||
print("Coucou")
|
||||
|
||||
func _on_body_entered(body):
|
||||
# Vérifie si le corps entrant est le joueur (ajuste selon ton nœud joueur)
|
||||
if body.is_in_group("players"):
|
||||
# Détruit le coin
|
||||
queue_free()
|
||||
|
||||
body.score += 100
|
||||
1
GPE/Coin/coin.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://jhf8u5r4vbvm
|
||||
201
GPE/Coin/coin.tscn
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
[gd_scene load_steps=30 format=3 uid="uid://c8ek4me3t12pp"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cy1umt0i3b0jq" path="res://GPE/Coin/coin-64x64.png" id="1_1tl7t"]
|
||||
[ext_resource type="Script" uid="uid://jhf8u5r4vbvm" path="res://GPE/Coin/coin.gd" id="1_h6kye"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_1tl7t"]
|
||||
radius = 53.15073
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_h6kye"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(0, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tono4"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(64, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_008ja"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(128, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_lwisg"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(192, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ewiup"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(256, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pyjji"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(320, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_le2pd"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(384, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_uskek"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(448, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_utsp0"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(512, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w0rjv"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(576, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_earre"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(640, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_i501j"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(704, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ewsff"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(768, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ldxko"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(832, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_t6oc7"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(896, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_uye42"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(960, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s34pf"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(1024, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o5m71"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(1088, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1fm44"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(1152, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w4y87"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(1216, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pu1iv"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(1280, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3t3ee"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(1344, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ecfmc"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(1408, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bb53q"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(1472, 0, 64, 64)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_4lxdy"]
|
||||
atlas = ExtResource("1_1tl7t")
|
||||
region = Rect2(1536, 0, 64, 64)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_1tl7t"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_h6kye")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tono4")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_008ja")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_lwisg")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ewiup")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pyjji")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_le2pd")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_uskek")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_utsp0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w0rjv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_earre")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_i501j")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ewsff")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ldxko")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_t6oc7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_uye42")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s34pf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_o5m71")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1fm44")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w4y87")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pu1iv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_3t3ee")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ecfmc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bb53q")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_4lxdy")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 24.0
|
||||
}]
|
||||
|
||||
[node name="Coin" type="Area2D"]
|
||||
scale = Vector2(0.5, 0.5)
|
||||
script = ExtResource("1_h6kye")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_1tl7t")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_1tl7t")
|
||||
autoplay = "default"
|
||||
9
Maps/Tiles/Tiles.tscn
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[gd_scene load_steps=3 format=4 uid="uid://c6rnvbhbn7ida"]
|
||||
|
||||
[ext_resource type="TileSet" uid="uid://cy866rju3ffv3" path="res://Maps/Tiles/terrain_tileset.tres" id="1_ok65l"]
|
||||
[ext_resource type="Script" uid="uid://cphm4sxgpf8nk" path="res://Maps/Tiles/tiles.gd" id="2_8cu1q"]
|
||||
|
||||
[node name="Tiles" type="TileMapLayer"]
|
||||
tile_map_data = PackedByteArray("AAACAAEAAQAAAAAAAAADAAEAAQABAAAAAAAEAAEAAQACAAcAAAAFAAEAAQACAAcAAAAFAAAAAQACAAcAAAAEAAAAAQACAAcAAAAEAAIAAQACAAcAAAAFAAIAAQACAAcAAAADAAIAAQAHAAYAAAADAAMAAQAHAAYAAAA=")
|
||||
tile_set = ExtResource("1_ok65l")
|
||||
script = ExtResource("2_8cu1q")
|
||||
111
Maps/Tiles/terrain_tileset.tres
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://cy866rju3ffv3"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ctagdxk8n72nq" path="res://Maps/Tiles/test.png" id="1_hwl2e"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_8yysw"]
|
||||
texture = ExtResource("1_hwl2e")
|
||||
texture_region_size = Vector2i(64, 64)
|
||||
0:0/0 = 0
|
||||
1:0/0 = 0
|
||||
2:0/0 = 0
|
||||
3:0/0 = 0
|
||||
4:0/0 = 0
|
||||
5:0/0 = 0
|
||||
6:0/0 = 0
|
||||
7:0/0 = 0
|
||||
8:0/0 = 0
|
||||
9:0/0 = 0
|
||||
0:1/0 = 0
|
||||
1:1/0 = 0
|
||||
2:1/0 = 0
|
||||
3:1/0 = 0
|
||||
4:1/0 = 0
|
||||
5:1/0 = 0
|
||||
6:1/0 = 0
|
||||
7:1/0 = 0
|
||||
8:1/0 = 0
|
||||
9:1/0 = 0
|
||||
0:2/0 = 0
|
||||
1:2/0 = 0
|
||||
2:2/0 = 0
|
||||
3:2/0 = 0
|
||||
4:2/0 = 0
|
||||
5:2/0 = 0
|
||||
6:2/0 = 0
|
||||
7:2/0 = 0
|
||||
8:2/0 = 0
|
||||
9:2/0 = 0
|
||||
0:3/0 = 0
|
||||
1:3/0 = 0
|
||||
2:3/0 = 0
|
||||
3:3/0 = 0
|
||||
4:3/0 = 0
|
||||
5:3/0 = 0
|
||||
6:3/0 = 0
|
||||
7:3/0 = 0
|
||||
8:3/0 = 0
|
||||
9:3/0 = 0
|
||||
0:4/0 = 0
|
||||
1:4/0 = 0
|
||||
2:4/0 = 0
|
||||
3:4/0 = 0
|
||||
4:4/0 = 0
|
||||
5:4/0 = 0
|
||||
6:4/0 = 0
|
||||
7:4/0 = 0
|
||||
8:4/0 = 0
|
||||
9:4/0 = 0
|
||||
0:5/0 = 0
|
||||
1:5/0 = 0
|
||||
2:5/0 = 0
|
||||
3:5/0 = 0
|
||||
4:5/0 = 0
|
||||
5:5/0 = 0
|
||||
6:5/0 = 0
|
||||
7:5/0 = 0
|
||||
8:5/0 = 0
|
||||
9:5/0 = 0
|
||||
0:6/0 = 0
|
||||
1:6/0 = 0
|
||||
2:6/0 = 0
|
||||
3:6/0 = 0
|
||||
4:6/0 = 0
|
||||
5:6/0 = 0
|
||||
6:6/0 = 0
|
||||
7:6/0 = 0
|
||||
8:6/0 = 0
|
||||
9:6/0 = 0
|
||||
0:7/0 = 0
|
||||
1:7/0 = 0
|
||||
2:7/0 = 0
|
||||
3:7/0 = 0
|
||||
4:7/0 = 0
|
||||
5:7/0 = 0
|
||||
6:7/0 = 0
|
||||
7:7/0 = 0
|
||||
8:7/0 = 0
|
||||
9:7/0 = 0
|
||||
0:8/0 = 0
|
||||
1:8/0 = 0
|
||||
2:8/0 = 0
|
||||
3:8/0 = 0
|
||||
4:8/0 = 0
|
||||
5:8/0 = 0
|
||||
6:8/0 = 0
|
||||
7:8/0 = 0
|
||||
8:8/0 = 0
|
||||
9:8/0 = 0
|
||||
0:9/0 = 0
|
||||
1:9/0 = 0
|
||||
2:9/0 = 0
|
||||
3:9/0 = 0
|
||||
4:9/0 = 0
|
||||
5:9/0 = 0
|
||||
6:9/0 = 0
|
||||
7:9/0 = 0
|
||||
8:9/0 = 0
|
||||
9:9/0 = 0
|
||||
|
||||
[resource]
|
||||
tile_size = Vector2i(64, 64)
|
||||
sources/1 = SubResource("TileSetAtlasSource_8yysw")
|
||||
BIN
Maps/Tiles/test.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
40
Maps/Tiles/test.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ctagdxk8n72nq"
|
||||
path="res://.godot/imported/test.png-5c12bd3f9ab31232a7d349c3b50efeac.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Maps/Tiles/test.png"
|
||||
dest_files=["res://.godot/imported/test.png-5c12bd3f9ab31232a7d349c3b50efeac.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
Maps/Tiles/tile_sand_corner_SW.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
40
Maps/Tiles/tile_sand_corner_SW.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dph64lwy2kcn2"
|
||||
path="res://.godot/imported/tile_sand_corner_SW.png-0698ad97c39f130e4cfe18045d371854.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Maps/Tiles/tile_sand_corner_SW.png"
|
||||
dest_files=["res://.godot/imported/tile_sand_corner_SW.png-0698ad97c39f130e4cfe18045d371854.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
BIN
Maps/Tiles/tile_water.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
40
Maps/Tiles/tile_water.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bjtlwshdtfu20"
|
||||
path="res://.godot/imported/tile_water.png-9b9ad34e9c63fad6f5939ca2a9114f92.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Maps/Tiles/tile_water.png"
|
||||
dest_files=["res://.godot/imported/tile_water.png-9b9ad34e9c63fad6f5939ca2a9114f92.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
16
Maps/Tiles/tiles.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
extends TileMapLayer
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
# Taille de la zone à couvrir (en tiles)
|
||||
var zone_size = 20
|
||||
# Remplir une zone carrée autour du centre
|
||||
for x in range(-zone_size, zone_size):
|
||||
for y in range(-zone_size, zone_size):
|
||||
set_cell(Vector2i(x, y), 1, Vector2i(2, 7)) # 0 = ID de la tile, Vector2i(0,0) = source
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta: float) -> void:
|
||||
pass
|
||||
1
Maps/Tiles/tiles.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cphm4sxgpf8nk
|
||||
7692
Maps/Tiles/tiles_vector.svg
Normal file
|
After Width: | Height: | Size: 310 KiB |
43
Maps/Tiles/tiles_vector.svg.import
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ct3tpcy3m5opa"
|
||||
path="res://.godot/imported/tiles_vector.svg-1982104786fae27b3b4671063bf2b952.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Maps/Tiles/tiles_vector.svg"
|
||||
dest_files=["res://.godot/imported/tiles_vector.svg-1982104786fae27b3b4671063bf2b952.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
33
Maps/gym_player.tscn
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
[gd_scene load_steps=5 format=4 uid="uid://dpy36duig8jgh"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ifus76ia8xws" path="res://Characters/player.tscn" id="1_jlnlo"]
|
||||
[ext_resource type="PackedScene" uid="uid://c6rnvbhbn7ida" path="res://Maps/Tiles/Tiles.tscn" id="2_7b103"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8ek4me3t12pp" path="res://GPE/Coin/coin.tscn" id="3_6hhq5"]
|
||||
[ext_resource type="PackedScene" uid="uid://mh40qx1bhgs5" path="res://Characters/pirate.tscn" id="4_rwt5c"]
|
||||
|
||||
[node name="Node" type="Node"]
|
||||
|
||||
[node name="Tiles" parent="." instance=ExtResource("2_7b103")]
|
||||
tile_map_data = PackedByteArray("AAAEAAIAAQAAAAAAAAAFAAIAAQABAAAAAAAGAAMAAQAEAAMAAAAFAAMAAQADAAMAAAAEAAMAAQACAAMAAAAGAAIAAQACAAAAAAA=")
|
||||
|
||||
[node name="Tiles2" parent="." instance=ExtResource("2_7b103")]
|
||||
tile_map_data = PackedByteArray("AAAEAAIAAQAAAAAAAAAFAAIAAQABAAAAAAAGAAMAAQAEAAMAAAAFAAMAAQADAAMAAAAEAAMAAQACAAMAAAAGAAIAAQACAAAAAAA=")
|
||||
script = null
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_jlnlo")]
|
||||
position = Vector2(124, 126)
|
||||
|
||||
[node name="Coin" parent="." instance=ExtResource("3_6hhq5")]
|
||||
position = Vector2(114, 242)
|
||||
|
||||
[node name="Pirate" parent="." instance=ExtResource("4_rwt5c")]
|
||||
position = Vector2(-5, 304)
|
||||
|
||||
[node name="Pirate2" parent="." instance=ExtResource("4_rwt5c")]
|
||||
position = Vector2(312, 315)
|
||||
|
||||
[node name="Pirate3" parent="." instance=ExtResource("4_rwt5c")]
|
||||
position = Vector2(331, 39)
|
||||
|
||||
[node name="Pirate4" parent="." instance=ExtResource("4_rwt5c")]
|
||||
position = Vector2(-153, -73)
|
||||
18
Player/hud.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
extends CanvasLayer
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta: float) -> void:
|
||||
#var player = get_parent().get_node("player")
|
||||
var player = get_parent()
|
||||
update_score(player.score)
|
||||
|
||||
|
||||
|
||||
func update_score(score: int) -> void:
|
||||
$ScoreLabel.text = "Score: " + str(score)
|
||||
1
Player/hud.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cmkaxwj67x6o4
|
||||
13
Player/hud.tscn
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://c2pruida0t5o0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cmkaxwj67x6o4" path="res://Player/hud.gd" id="1_ns4kc"]
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer"]
|
||||
script = ExtResource("1_ns4kc")
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="."]
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 23.0
|
||||
grow_horizontal = 2
|
||||
text = "Score:"
|
||||
1
icon.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>
|
||||
|
After Width: | Height: | Size: 995 B |
43
icon.svg.import
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dja28yqp1k4nv"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.svg"
|
||||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
45
project.godot
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="PirateSurvivors"
|
||||
run/main_scene="uid://dpy36duig8jgh"
|
||||
config/features=PackedStringArray("4.5", "Forward Plus")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=960
|
||||
window/size/viewport_height=540
|
||||
window/stretch/mode="canvas_items"
|
||||
|
||||
[input]
|
||||
|
||||
move_right={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_left={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_up={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
move_down={
|
||||
"deadzone": 0.2,
|
||||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||