update gitignore
This commit is contained in:
parent
976d690299
commit
38c6091bef
20
.gitignore
vendored
20
.gitignore
vendored
@ -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
17
entities/CameraFollow.gd
Normal 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
|
24
entities/player/CharacterController.gd
Normal file
24
entities/player/CharacterController.gd
Normal 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
12
modules/weapons/Weapon.gd
Normal 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
|
11
modules/weapons/WeaponSystem.gd
Normal file
11
modules/weapons/WeaponSystem.gd
Normal 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
|
Loading…
x
Reference in New Issue
Block a user