update gitignore

This commit is contained in:
Yehoshua Sandler 2025-03-10 19:59:24 -05:00
parent 976d690299
commit 38c6091bef
5 changed files with 84 additions and 0 deletions

20
.gitignore vendored
View File

@ -1,3 +1,23 @@
# Godot 4+ specific ignores # Godot 4+ specific ignores
.godot/ .godot/
/android/ /android/
.import/
export.cfg
export_presets.cfg
# Dummy HTML5 export presets file for continuous integration
!.github/dist/export_presets.cfg
# Imported translations (automatically generated from CSV files)
*.translation
# Mono-specific ignores
.mono/
data_*/
mono_crash.*.json
# System/tool-specific ignores
.directory
.DS_Store
*~
*.blend1

17
entities/CameraFollow.gd Normal file
View File

@ -0,0 +1,17 @@
extends Camera2D
@onready var global = $"/root/Player"
var targetPosition = Vector2(0,0)
var moving = true
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass
global.connect("playerPosition",setTargetPosition)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if moving == true:
self.set_position(targetPosition)
func setTargetPosition(pos):
targetPosition = pos

View File

@ -0,0 +1,24 @@
extends CharacterBody2D
@onready var global = $"/root/Player"
const SPEED = 350.0
func _physics_process(delta: float) -> void:
global.emit_signal("playerPosition",self.global_position)
movement()
func animation():
pass
func movement():
var vertical = Input.get_axis("up","down")
var horizontal = Input.get_axis("left","right")
if is_equal_approx(abs(vertical),1.0) and is_equal_approx(abs(horizontal),1.0):
velocity.y = SPEED*vertical/2
velocity.x = SPEED*horizontal/2
else:
velocity.y = SPEED * vertical
velocity.x = SPEED * horizontal
move_and_slide()
$"../Camera2D/Label".text = (str(self.global_position))

12
modules/weapons/Weapon.gd Normal file
View File

@ -0,0 +1,12 @@
class_name Weapon extends Node
export(String) var type
# 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:
pass

View File

@ -0,0 +1,11 @@
extends Node
# 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:
pass