Ejemplo n.º 1
0
 private void LoadResources()
 {
     //Regestir for the event callback for the placing of the rooms
     PlaceExitEvent.RegisterListener(InitExitWall);
     //Init he raycasts of the room walls used for creating the room
     roofRay  = GetNode <RayCast>("Roof/RoofRay");
     floorRay = GetNode <RayCast>("Floor/FloorRay");
     frontRay = GetNode <RayCast>("FrontWall/FrontRay");
     backRay  = GetNode <RayCast>("BackWall/BackRay");
     leftRay  = GetNode <RayCast>("LeftWall/LeftRay");
     rightRay = GetNode <RayCast>("RightWall/RightRay");
     //Get the reference to the walls
     frontWall = GetNode <KinematicBody>("FrontWall");
     backWall  = GetNode <KinematicBody>("BackWall");
     leftWall  = GetNode <KinematicBody>("LeftWall");
     rightWall = GetNode <KinematicBody>("RightWall");
     roofWall  = GetNode <KinematicBody>("Roof");
     floorWall = GetNode <KinematicBody>("Floor");
     //Get the refferences to the platform sets
     platformSet1Scene = ResourceLoader.Load("res://Scenes/PlatformSet1.tscn") as PackedScene;
     platformSet2Scene = ResourceLoader.Load("res://Scenes/PlatformSet2.tscn") as PackedScene;
     platformSet3Scene = ResourceLoader.Load("res://Scenes/PlatformSet3.tscn") as PackedScene;
     platformSet4Scene = ResourceLoader.Load("res://Scenes/PlatformSet4.tscn") as PackedScene;
     platformSet5Scene = ResourceLoader.Load("res://Scenes/PlatformSet5.tscn") as PackedScene;
     platformSet6Scene = ResourceLoader.Load("res://Scenes/PlatformSet6.tscn") as PackedScene;
     platformSet7Scene = ResourceLoader.Load("res://Scenes/PlatformSet7.tscn") as PackedScene;
     //Grab the reference to the exit walls scene
     exitWallScene = ResourceLoader.Load("res://Scenes/ExitWall.tscn") as PackedScene;
 }