Mathilde Grapin
7038d29d87
Add simple player movement with a finite state machine. Add enemy that can move to target point. Add ground through a tilemap and wall that player and enemy cannot cross.
22 lines
782 B
Plaintext
22 lines
782 B
Plaintext
[gd_scene load_steps=4 format=3 uid="uid://cdwgmtyq2y8sm"]
|
|
|
|
[ext_resource type="PackedScene" uid="uid://m8uyi35gr3qd" path="res://scenes/tile_map.tscn" id="2_c6bkg"]
|
|
[ext_resource type="PackedScene" uid="uid://ba1t35yyot4jl" path="res://scenes/player.tscn" id="2_idv37"]
|
|
[ext_resource type="PackedScene" uid="uid://bktg1ypaav3q3" path="res://scenes/enemy.tscn" id="3_2xcd4"]
|
|
|
|
[node name="Main" type="Node2D"]
|
|
y_sort_enabled = true
|
|
|
|
[node name="TileMap" parent="." instance=ExtResource("2_c6bkg")]
|
|
position = Vector2(324, 82)
|
|
|
|
[node name="Enemy" parent="TileMap" instance=ExtResource("3_2xcd4")]
|
|
z_index = 1
|
|
y_sort_enabled = true
|
|
position = Vector2(0, 40)
|
|
|
|
[node name="Player" parent="TileMap" instance=ExtResource("2_idv37")]
|
|
z_index = 1
|
|
z_as_relative = false
|
|
y_sort_enabled = true
|