= fixed map colors on borders, added a prototype enemy wich currently has unexpected behavior, on collision he pulles the player with him.

This commit is contained in:
Platinwing 2023-02-01 23:30:19 +01:00
parent 4efe49303d
commit 093f6eb94e
6 changed files with 77 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dx5k5qa1pwbfl"
path="res://.godot/imported/basic_enemy.png-86528a00f666ed79fdb26797653efdd4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Textures/basic_enemy.png"
dest_files=["res://.godot/imported/basic_enemy.png-86528a00f666ed79fdb26797653efdd4.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
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

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,19 @@
extends CharacterBody2D
@export var speed = 25
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(delta):
var sprite = self.get_child(1)
self.velocity = Vector2(cos(sprite.get_rotation() - PI / 2), sin(sprite.get_rotation() - PI / 2)).normalized() * speed
if self.move_and_slide():
sprite.rotate(PI)

View file

@ -7,12 +7,12 @@ func _ready():
pass # Replace with function body.
func get_input():
var input_direction = Input.get_vector("move_left", "move_right", "move_up", "move_down")
velocity = input_direction * speed
var input_direction = Input.get_vector("move_left", "move_right", "move_up", "move_down").normalized()
return input_direction
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(delta):
get_input()
move_and_slide()
self.velocity = get_input() * speed
self.move_and_slide()