Initial commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://2ekco7xpg1bj"
|
||||
path="res://.godot/imported/HangerRoomData.png-20cd3ad88c21fbd347e0d1e93ef65e4c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Maps/Rooms/Starter/Hanger/HangerRoomData.png"
|
||||
dest_files=["res://.godot/imported/HangerRoomData.png-20cd3ad88c21fbd347e0d1e93ef65e4c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
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/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
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
|
||||
@@ -0,0 +1,41 @@
|
||||
extends Node3D
|
||||
class_name MapLogic
|
||||
|
||||
signal onCollision
|
||||
|
||||
signal missionLost
|
||||
|
||||
@export var debugObj: PackedScene
|
||||
@export var pathPivot: Node3D
|
||||
@export var drawDebugCubesPathfinding:= false
|
||||
|
||||
@export var pathfindingGridLoader: PathfindingGridLoader
|
||||
var astar : AStar2D
|
||||
|
||||
@export var playerStartPos: Vector3
|
||||
|
||||
func _ready() -> void:
|
||||
if pathfindingGridLoader: pathfindingGridLoader.loadGrid()
|
||||
|
||||
func looseMission() -> void:
|
||||
missionLost.emit()
|
||||
|
||||
|
||||
func finishAstarSetup() -> void: ##Run this in process or physics process of the child map class
|
||||
if pathfindingGridLoader:
|
||||
if pathfindingGridLoader.loading_done:
|
||||
astar = pathfindingGridLoader.astar
|
||||
print(astar.get_point_count())
|
||||
pathfindingGridLoader.queue_free()
|
||||
|
||||
if drawDebugCubesPathfinding: #Only for debugging
|
||||
for point in astar.get_point_ids():
|
||||
var point_position: Vector2 = astar.get_point_position(point)
|
||||
addObject(debugObj,pathPivot,Vector3(point_position.x,0.2,point_position.y))
|
||||
|
||||
func addObject(AddedObject:PackedScene, Parent: Node, Position: Vector3, Rotation: Vector3= Vector3(0,0,0)):
|
||||
var obj = AddedObject.instantiate()
|
||||
Parent.add_child(obj)
|
||||
obj.position = Position
|
||||
obj.rotation = Rotation
|
||||
return obj
|
||||
@@ -0,0 +1 @@
|
||||
uid://or6760ji86d2
|
||||
Reference in New Issue
Block a user