Added basic in chunk item spawning and movement
This commit is contained in:
parent
106efecf55
commit
97c931a50e
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://cjs660cs0u4rk"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cjs660cs0u4rk"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://b17vn1ecnbc36" path="res://logic/world/world.tscn" id="1_tg0rs"]
|
||||
[ext_resource type="Script" uid="uid://f1n37ucrb0j4" path="res://logic/camera/camera.gd" id="2_ahkbh"]
|
||||
[ext_resource type="PackedScene" uid="uid://dm5hhlwlhnmdb" path="res://logic/mechanics/interaction/world_interaction.tscn" id="3_5pa27"]
|
||||
[ext_resource type="PackedScene" uid="uid://cgrgaehjqja4d" path="res://logic/world/chunk/chunk_drawing.tscn" id="3_gphrn"]
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
|
@ -11,6 +12,9 @@
|
|||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
script = ExtResource("2_ahkbh")
|
||||
|
||||
[node name="World Interaction" parent="Camera2D" node_paths=PackedStringArray("world") instance=ExtResource("3_5pa27")]
|
||||
world = NodePath("../../World")
|
||||
|
||||
[node name="Chunk Drawing" parent="." node_paths=PackedStringArray("world", "camera") instance=ExtResource("3_gphrn")]
|
||||
world = NodePath("../World")
|
||||
camera = NodePath("../Camera2D")
|
||||
|
|
|
@ -8,8 +8,10 @@ var dragging = false
|
|||
|
||||
@export var zoom_constant : float = 1.1
|
||||
|
||||
@export var min_zoom = 0.3
|
||||
@export var max_zoom = 3
|
||||
@export var min_zoom : float = 0.3
|
||||
@export var max_zoom : float = 3
|
||||
|
||||
@export var speed : float = 1000
|
||||
|
||||
func get_camera_rect() -> Rect2:
|
||||
var pos = position
|
||||
|
@ -39,3 +41,12 @@ func _process(delta: float) -> void:
|
|||
var current_mouse_position = get_local_mouse_position()
|
||||
position += (last_drag_position - current_mouse_position)
|
||||
last_drag_position = current_mouse_position
|
||||
|
||||
if Input.is_action_pressed("camera_down"):
|
||||
position.y += speed / zoom.y * delta
|
||||
if Input.is_action_pressed("camera_up"):
|
||||
position.y -= speed / zoom.y * delta
|
||||
if Input.is_action_pressed("camera_left"):
|
||||
position.x -= speed / zoom.x * delta
|
||||
if Input.is_action_pressed("camera_right"):
|
||||
position.x += speed / zoom.x * delta
|
||||
|
|
|
@ -2,3 +2,6 @@ class_name Arrow
|
|||
|
||||
var direction : Vector2i
|
||||
var filter : int
|
||||
|
||||
func _init(direction : Vector2i):
|
||||
self.direction = direction
|
||||
|
|
54
logic/mechanics/interaction/world_interaction.gd
Normal file
54
logic/mechanics/interaction/world_interaction.gd
Normal file
|
@ -0,0 +1,54 @@
|
|||
extends Node2D
|
||||
|
||||
@export var world : World
|
||||
|
||||
@onready var object_shadow = $"Object Shadow"
|
||||
|
||||
var direction : Vector2i = Vector2i(1, 0)
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton:
|
||||
if event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
|
||||
var tile_position : Vector2i = world.global_position_to_tile(get_global_mouse_position())
|
||||
var chunk_position : Vector2i = world.tile_pos_to_chunk_pos(tile_position)
|
||||
var position_in_chunk : Vector2i = tile_position - chunk_position * TileGlobals.chunk_size
|
||||
|
||||
var chunk : Chunk = world.get_chunk_at(chunk_position)
|
||||
|
||||
var new_arrow : Arrow = Arrow.new(direction)
|
||||
|
||||
chunk.arrows[position_in_chunk] = new_arrow
|
||||
chunk.recalculate()
|
||||
world.updated.emit(chunk)
|
||||
|
||||
elif event.button_index == MOUSE_BUTTON_RIGHT and event.pressed:
|
||||
var tile_position : Vector2i = world.global_position_to_tile(get_global_mouse_position())
|
||||
var chunk_position : Vector2i = world.tile_pos_to_chunk_pos(tile_position)
|
||||
var position_in_chunk : Vector2i = tile_position - chunk_position * TileGlobals.chunk_size
|
||||
|
||||
var chunk : Chunk = world.get_chunk_at(chunk_position)
|
||||
|
||||
chunk.arrows.erase(position_in_chunk)
|
||||
chunk.recalculate()
|
||||
world.updated.emit(chunk)
|
||||
|
||||
elif event.is_action_pressed("rotate_right"):
|
||||
direction = rotate_vector2i(direction)
|
||||
elif event.is_action_pressed("rotate_left"):
|
||||
direction = rotate_vector2i(direction, true)
|
||||
|
||||
func rotate_vector2i(vector : Vector2i, counter_clockwise : bool = false) -> Vector2i:
|
||||
if counter_clockwise:
|
||||
return Vector2i(1,-1) * Vector2i(vector.y, vector.x)
|
||||
return Vector2i(-1,1) * Vector2i(vector.y, vector.x)
|
||||
|
||||
func _ready():
|
||||
object_shadow.z_index = 1
|
||||
object_shadow.texture = ImageTexture.create_from_image(preload("res://resources/misc/arrows.png").get_layer_data(0))
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
var tile_size = Vector2(TileGlobals.tile_size, TileGlobals.tile_size)
|
||||
var object_shadow_position = (get_global_mouse_position() - tile_size/2).snapped(tile_size) + tile_size/2
|
||||
object_shadow.global_position = object_shadow_position
|
||||
|
||||
object_shadow.look_at(object_shadow.global_position + Vector2(direction))
|
1
logic/mechanics/interaction/world_interaction.gd.uid
Normal file
1
logic/mechanics/interaction/world_interaction.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://cpjhjc17ybuxg
|
9
logic/mechanics/interaction/world_interaction.tscn
Normal file
9
logic/mechanics/interaction/world_interaction.tscn
Normal file
|
@ -0,0 +1,9 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://dm5hhlwlhnmdb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cpjhjc17ybuxg" path="res://logic/mechanics/interaction/world_interaction.gd" id="1_gh8ie"]
|
||||
|
||||
[node name="World Interaction" type="Node2D"]
|
||||
script = ExtResource("1_gh8ie")
|
||||
|
||||
[node name="Object Shadow" type="Sprite2D" parent="."]
|
||||
modulate = Color(1, 1, 1, 0.498039)
|
|
@ -3,5 +3,6 @@ class_name Item
|
|||
var id : int
|
||||
var direction : Vector2i
|
||||
|
||||
func _init(id : int):
|
||||
func _init(id : int, direction : Vector2i):
|
||||
self.id = id
|
||||
self.direction = direction
|
||||
|
|
|
@ -3,6 +3,8 @@ extends Node
|
|||
var item_definitions : Array[ItemDefinition]
|
||||
var item_atlas : CompressedTexture2DArray
|
||||
|
||||
enum {WOOD, IRON}
|
||||
|
||||
const chunk_size : int = 32
|
||||
const tile_size : int = 16
|
||||
|
||||
|
|
|
@ -3,10 +3,19 @@ class_name Chunk
|
|||
var tiles : Array[int]
|
||||
var position : Vector2i
|
||||
|
||||
var spawner_tiles : Array[Vector2i]
|
||||
|
||||
var items : Dictionary[Vector2i, Item]
|
||||
var arrows : Dictionary[Vector2i, Arrow]
|
||||
|
||||
var processed = false
|
||||
|
||||
var incoming_items : Dictionary[Vector2i, Item]
|
||||
|
||||
var tickable = false
|
||||
|
||||
func _init(position : Vector2i) -> void:
|
||||
|
||||
self.position = position
|
||||
|
||||
var noise : FastNoiseLite = FastNoiseLite.new()
|
||||
|
@ -37,5 +46,52 @@ func _init(position : Vector2i) -> void:
|
|||
|
||||
x += 1
|
||||
|
||||
if randi_range(0,10) == 0:
|
||||
var tile_idx = randi_range(0, TileGlobals.chunk_size ** 2)
|
||||
if tiles[tile_idx] == TileGlobals.GRASS:
|
||||
tiles[tile_idx] = TileGlobals.TREE
|
||||
|
||||
var tile_position = Vector2i(0, 0)
|
||||
for tile : int in tiles:
|
||||
if tile_position.x >= TileGlobals.chunk_size:
|
||||
tile_position.y += 1
|
||||
tile_position.x = 0
|
||||
|
||||
if tile in TileGlobals.resource_tiles.keys():
|
||||
spawner_tiles.append(tile_position)
|
||||
|
||||
tile_position.x += 1
|
||||
|
||||
## Updates chunk and returns whether it changed
|
||||
func update() -> bool:
|
||||
if not tickable:
|
||||
return false
|
||||
|
||||
var new_items : Dictionary[Vector2i, Item]
|
||||
|
||||
for item_position : Vector2i in items.keys():
|
||||
var item = items[item_position]
|
||||
|
||||
var new_position = item_position + item.direction
|
||||
|
||||
new_items[new_position] = item
|
||||
|
||||
items = new_items
|
||||
|
||||
for tile_pos in spawner_tiles:
|
||||
if arrows.has(tile_pos) and not items.has(tile_pos):
|
||||
items[tile_pos] = Item.new(TileGlobals.resource_tiles[get_tile(tile_pos)], arrows[tile_pos].direction)
|
||||
|
||||
return true
|
||||
|
||||
func recalculate():
|
||||
if len(items) > 0 or len(arrows) > 0:
|
||||
tickable = true
|
||||
else:
|
||||
tickable = false
|
||||
|
||||
func get_tile(pos : Vector2i):
|
||||
return tiles[pos.y * TileGlobals.chunk_size + pos.x]
|
||||
|
||||
func set_tile(pos : Vector2i, tile_id : int):
|
||||
tiles[pos.y * TileGlobals.chunk_size + pos.x] = tile_id
|
||||
|
|
|
@ -4,22 +4,47 @@ uniform float tile_count;
|
|||
|
||||
const int chunk_size = 32;
|
||||
|
||||
uniform bool borders = true;
|
||||
const float border_size = 0.01;
|
||||
|
||||
uniform int tiles[chunk_size*chunk_size];
|
||||
uniform int items[chunk_size*chunk_size];
|
||||
uniform int arrows[chunk_size*chunk_size];
|
||||
|
||||
uniform sampler2DArray tile_texture : filter_nearest_mipmap;
|
||||
uniform sampler2DArray item_texture : filter_nearest;
|
||||
uniform sampler2DArray arrow_texture : filter_nearest;
|
||||
|
||||
void fragment() {
|
||||
float item_id = float(items[int(floor(float(chunk_size) * UV.x) + float(chunk_size) * floor(float(chunk_size) * UV.y))]);
|
||||
COLOR = texture(item_texture,
|
||||
vec3(mod(UV.x * float(chunk_size), 1.0), mod(UV.y * float(chunk_size), 1.0), float(item_id)) // map
|
||||
);
|
||||
COLOR = vec4(0,0,0,0);
|
||||
int arrow_id = arrows[int(floor(float(chunk_size) * UV.x) + float(chunk_size) * floor(float(chunk_size) * UV.y))];
|
||||
if (arrow_id != -1){
|
||||
COLOR = texture(arrow_texture,
|
||||
vec3(mod(UV.x * float(chunk_size), 1.0), mod(UV.y * float(chunk_size), 1.0), float(arrow_id)) // map
|
||||
);
|
||||
}
|
||||
|
||||
if (COLOR == vec4(0,0,0,0)){
|
||||
float tile_id = float(tiles[int(floor(float(chunk_size) * UV.x) + float(chunk_size) * floor(float(chunk_size) * UV.y))]);
|
||||
int item_id = items[int(floor(float(chunk_size) * UV.x) + float(chunk_size) * floor(float(chunk_size) * UV.y))];
|
||||
if (item_id != -1){
|
||||
COLOR = texture(item_texture,
|
||||
vec3(mod(UV.x * float(chunk_size), 1.0), mod(UV.y * float(chunk_size), 1.0), float(item_id)) // map
|
||||
);
|
||||
}
|
||||
}
|
||||
if (COLOR == vec4(0,0,0,0)){
|
||||
int tile_id = tiles[int(floor(float(chunk_size) * UV.x) + float(chunk_size) * floor(float(chunk_size) * UV.y))];
|
||||
COLOR = texture(tile_texture,
|
||||
vec3(mod(UV.x * float(chunk_size), 1.0), mod(UV.y * float(chunk_size), 1.0), float(tile_id)) // map
|
||||
);
|
||||
}
|
||||
|
||||
if (borders){
|
||||
if(
|
||||
UV.x < border_size || UV.x > 1.0-border_size ||
|
||||
UV.y < border_size || UV.y > 1.0-border_size
|
||||
){
|
||||
COLOR -= vec4(0.1,0.1,0.1,0);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,60 +7,88 @@ extends Node2D
|
|||
|
||||
var chunk_textures : Dictionary[Chunk, Sprite2D]
|
||||
|
||||
func _ready():
|
||||
world.updated.connect(update_chunk_shader_parameters)
|
||||
|
||||
func _draw():
|
||||
var camera_chunk = world.tile_pos_to_chunk_pos(Vector2i(camera.position / TileGlobals.tile_size / 2))
|
||||
var camera_chunk : Vector2i = world.tile_pos_to_chunk_pos(world.global_position_to_tile(camera.position))
|
||||
|
||||
var camera_size : Vector2 = camera.get_camera_rect().size / TileGlobals.chunk_size / TileGlobals.tile_size / 2
|
||||
var adjusted_size : Vector2i = Vector2i(ceil(camera_size.x) + 2, ceil(camera_size.y) + 2)
|
||||
var generation_radius = maxi(adjusted_size.x, adjusted_size.y)
|
||||
var adjusted_size : Vector2i = Vector2i(ceil(camera_size.x), ceil(camera_size.y))
|
||||
|
||||
for y in range(camera_chunk.y - generation_radius, camera_chunk.y + generation_radius):
|
||||
for x in range(camera_chunk.x - generation_radius, camera_chunk.x + generation_radius):
|
||||
for y in range(-adjusted_size.y, adjusted_size.y+1):
|
||||
for x in range(-adjusted_size.x, adjusted_size.x+1):
|
||||
draw_chunk(world.get_chunk_at(camera_chunk + Vector2i(x,y)))
|
||||
|
||||
func draw_chunk(chunk : Chunk) -> void:
|
||||
var x : int = 0
|
||||
var y : int = 0
|
||||
var offset : Vector2 = chunk.position * TileGlobals.chunk_size * TileGlobals.tile_size
|
||||
|
||||
if not chunk_textures.has(chunk):
|
||||
var new_sprite2d : Sprite2D = Sprite2D.new()
|
||||
new_sprite2d.texture = preload("res://resources/items/textures/blank_tile.png")
|
||||
new_sprite2d.position = offset
|
||||
new_sprite2d.scale = Vector2(
|
||||
var chunk_sprite : Sprite2D = Sprite2D.new()
|
||||
chunk_sprite.texture = preload("res://resources/items/textures/blank_tile.png")
|
||||
chunk_sprite.position = offset
|
||||
chunk_sprite.centered = false
|
||||
chunk_sprite.scale = Vector2(
|
||||
TileGlobals.chunk_size,
|
||||
TileGlobals.chunk_size
|
||||
)
|
||||
|
||||
chunk_sprite.texture_repeat = CanvasItem.TEXTURE_REPEAT_ENABLED
|
||||
|
||||
chunk_textures[chunk] = chunk_sprite
|
||||
|
||||
var new_shader_material : ShaderMaterial = ShaderMaterial.new()
|
||||
new_shader_material.shader = chunk_shader
|
||||
|
||||
new_sprite2d.material = new_shader_material
|
||||
chunk_sprite.material = new_shader_material
|
||||
add_child(chunk_sprite)
|
||||
|
||||
new_sprite2d.material.set_shader_parameter("tile_size", TileGlobals.tile_size)
|
||||
new_sprite2d.material.set_shader_parameter("tile_count", len(TileGlobals.tile_definitions))
|
||||
new_sprite2d.material.set_shader_parameter("tile_texture", TileGlobals.tile_atlas)
|
||||
update_chunk_shader_parameters(chunk)
|
||||
|
||||
var item_array : Array[int]
|
||||
func update_chunk_shader_parameters(chunk : Chunk):
|
||||
draw_chunk(chunk)
|
||||
var chunk_sprite : Sprite2D = chunk_textures[chunk]
|
||||
chunk_sprite.material.set_shader_parameter("tile_size", TileGlobals.tile_size)
|
||||
chunk_sprite.material.set_shader_parameter("tile_count", len(TileGlobals.tile_definitions))
|
||||
chunk_sprite.material.set_shader_parameter("tile_texture", TileGlobals.tile_atlas)
|
||||
|
||||
for iy in range(TileGlobals.chunk_size):
|
||||
for ix in range(TileGlobals.chunk_size):
|
||||
item_array.append(0)
|
||||
var item_array : Array[int]
|
||||
|
||||
for item_pos in chunk.items.keys():
|
||||
item_array[item_pos.y*TileGlobals.chunk_size+item_pos.x] = chunk.items[item_pos].id
|
||||
for iy in range(TileGlobals.chunk_size):
|
||||
for ix in range(TileGlobals.chunk_size):
|
||||
item_array.append(-1)
|
||||
|
||||
new_sprite2d.material.set_shader_parameter("item_texture", ItemGlobals.item_atlas)
|
||||
for item_pos in chunk.items.keys():
|
||||
item_array[item_pos.y*TileGlobals.chunk_size+item_pos.x] = chunk.items[item_pos].id
|
||||
|
||||
new_sprite2d.material.set_shader_parameter("tiles", chunk.tiles)
|
||||
new_sprite2d.material.set_shader_parameter("items", item_array)
|
||||
var arrow_array : Array[int]
|
||||
|
||||
new_sprite2d.texture_repeat = CanvasItem.TEXTURE_REPEAT_ENABLED
|
||||
for iy in range(TileGlobals.chunk_size):
|
||||
for ix in range(TileGlobals.chunk_size):
|
||||
arrow_array.append(-1)
|
||||
|
||||
chunk_textures[chunk] = new_sprite2d
|
||||
add_child(new_sprite2d)
|
||||
for arrow_pos in chunk.arrows.keys():
|
||||
var arrow_direction = chunk.arrows[arrow_pos].direction
|
||||
var int_direction = 0
|
||||
|
||||
match arrow_direction:
|
||||
Vector2i(1, 0):
|
||||
int_direction = 0
|
||||
Vector2i(0, 1):
|
||||
int_direction = 1
|
||||
Vector2i(-1, 0):
|
||||
int_direction = 2
|
||||
Vector2i(0, -1):
|
||||
int_direction = 3
|
||||
|
||||
arrow_array[arrow_pos.y*TileGlobals.chunk_size+arrow_pos.x] = int_direction
|
||||
|
||||
chunk_sprite.material.set_shader_parameter("item_texture", ItemGlobals.item_atlas)
|
||||
chunk_sprite.material.set_shader_parameter("arrow_texture", preload("res://resources/misc/arrows.png"))
|
||||
|
||||
chunk_sprite.material.set_shader_parameter("tiles", chunk.tiles)
|
||||
chunk_sprite.material.set_shader_parameter("items", item_array)
|
||||
chunk_sprite.material.set_shader_parameter("arrows", arrow_array)
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
extends Node
|
||||
|
||||
var tile_definitions : Array[TileDefinition]
|
||||
|
||||
enum {WATER, GRASS, STONE, TREE}
|
||||
|
||||
const resource_tiles : Dictionary[int, int] = {TREE : ItemGlobals.WOOD}
|
||||
|
||||
var tile_atlas : CompressedTexture2DArray
|
||||
|
||||
var chunk_gradient : Gradient
|
||||
|
|
|
@ -4,6 +4,11 @@ class_name World
|
|||
|
||||
var chunks : Dictionary[Vector2i, Chunk]
|
||||
|
||||
var tps = 1
|
||||
var update_timer = 0
|
||||
|
||||
signal updated(chunk : Chunk)
|
||||
|
||||
func get_chunk_at(position : Vector2i) -> Chunk:
|
||||
if chunks.has(position): return chunks[position]
|
||||
|
||||
|
@ -13,8 +18,35 @@ func get_chunk_at(position : Vector2i) -> Chunk:
|
|||
|
||||
return new_chunk
|
||||
|
||||
func tile_pos_to_chunk_pos(position : Vector2i):
|
||||
return position / TileGlobals.chunk_size
|
||||
func tile_pos_to_chunk_pos(position : Vector2i) -> Vector2i:
|
||||
return floor(Vector2(position) / TileGlobals.chunk_size)
|
||||
|
||||
func _ready() -> void:
|
||||
pass
|
||||
|
||||
func set_tile(position : Vector2i, tile_id : int):
|
||||
var chunk_position : Vector2i = tile_pos_to_chunk_pos(position)
|
||||
var position_in_chunk = position - chunk_position * TileGlobals.chunk_size
|
||||
var chunk : Chunk = get_chunk_at(chunk_position)
|
||||
|
||||
chunk.set_tile(position_in_chunk, tile_id)
|
||||
updated.emit(chunk)
|
||||
|
||||
func add_item(position : Vector2i, item : Item):
|
||||
var chunk_position : Vector2i = tile_pos_to_chunk_pos(position)
|
||||
var position_in_chunk = position - chunk_position * TileGlobals.chunk_size
|
||||
var chunk : Chunk = get_chunk_at(chunk_position)
|
||||
|
||||
func global_position_to_tile(position : Vector2) -> Vector2i:
|
||||
return Vector2i(floor(position/TileGlobals.tile_size))
|
||||
|
||||
func update_chunks():
|
||||
for chunk in chunks.values():
|
||||
if chunk.update():
|
||||
updated.emit(chunk)
|
||||
|
||||
func _process(delta):
|
||||
update_timer -= delta
|
||||
if update_timer <= 0:
|
||||
update_timer = 1/tps
|
||||
update_chunks()
|
||||
|
|
|
@ -21,6 +21,44 @@ Globals="*res://globals.gd"
|
|||
TileGlobals="*res://logic/world/chunk/tile/tile_globals.gd"
|
||||
ItemGlobals="*res://logic/mechanics/item/item_globals.gd"
|
||||
|
||||
[input]
|
||||
|
||||
camera_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)
|
||||
, 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":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
camera_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":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
, 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)
|
||||
]
|
||||
}
|
||||
camera_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)
|
||||
, 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":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
camera_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)
|
||||
, 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":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
rotate_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":81,"key_label":0,"unicode":113,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
rotate_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":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
|
||||
, 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":82,"key_label":0,"unicode":114,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[rendering]
|
||||
|
||||
textures/canvas_textures/default_texture_filter=3
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 468 B After Width: | Height: | Size: 555 B |
|
@ -22,5 +22,5 @@ compress/hdr_compression=1
|
|||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
slices/horizontal=3
|
||||
slices/horizontal=2
|
||||
slices/vertical=1
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
importer="2d_array_texture"
|
||||
type="CompressedTexture2DArray"
|
||||
uid="uid://d1nsg6nkifsuy"
|
||||
path="res://.godot/imported/arrows.png-f4154ffb8ad82a4cead337521dc1b0a8.ctex"
|
||||
path="res://.godot/imported/arrows.png-f4154ffb8ad82a4cead337521dc1b0a8.ctexarray"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ metadata={
|
|||
[deps]
|
||||
|
||||
source_file="res://resources/misc/arrows.png"
|
||||
dest_files=["res://.godot/imported/arrows.png-f4154ffb8ad82a4cead337521dc1b0a8.ctex"]
|
||||
dest_files=["res://.godot/imported/arrows.png-f4154ffb8ad82a4cead337521dc1b0a8.ctexarray"]
|
||||
|
||||
[params]
|
||||
|
||||
|
@ -19,16 +19,8 @@ compress/mode=0
|
|||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
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/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
|
||||
slices/horizontal=4
|
||||
slices/vertical=1
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 535 B |
|
@ -2,7 +2,7 @@
|
|||
|
||||
importer="2d_array_texture"
|
||||
type="CompressedTexture2DArray"
|
||||
uid="uid://c26cvgrip1chy"
|
||||
uid="uid://c5j5lt52wbt10"
|
||||
path="res://.godot/imported/tile_atlas.png-84b81a774fcf788b1f5c08b2a31c385e.ctexarray"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
@ -22,5 +22,5 @@ compress/hdr_compression=1
|
|||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
slices/horizontal=3
|
||||
slices/horizontal=4
|
||||
slices/vertical=1
|
||||
|
|
Loading…
Reference in a new issue