Ejemplo n.º 1
0
    public override void _Ready()
    {
        GD.Print(ConfigManager.BASE_CONFIG_FILE_DIRECTORY_PATH);
        GD.Print(ConfigManager.BASE_DIRECTORY);
        GD.Print(ConfigManager.BASE_CONFIG_FILE_PATH);
        VisualServer.SetDebugGenerateWireframes(true);
        gameController = (GameController)FindParent("GameController");
        ray            = (RayCast)gameController.FindNode("Picker");
        camera         = (Camera)FindNode("Camera");
        fps            = (Label)camera.FindNode("FPS");
        position       = (Label)camera.FindNode("Position");
        chunks         = (Label)camera.FindNode("Chunks");
        vertices       = (Label)camera.FindNode("Vertices");
        memory         = (Label)camera.FindNode("Memory");
        speed          = (Label)camera.FindNode("Movement Speed");

        initialRotation = new Vector3();

        picker = gameController.GetPicker();

        Input.SetMouseMode(Input.MouseMode.Captured);

        TerraVector3 origin = Converter.ConvertVector(GlobalTransform.origin);
        TerraBasis   basis  = Converter.ConvertBasis(GlobalTransform.basis);

        marker = new LoadMarker(origin, basis);

        gameController.Prepare(camera, marker);
    }
Ejemplo n.º 2
0
 public override void _Ready()
 {
     VisualServer.SetDebugGenerateWireframes(true);
     MaterialOverride = new SpatialMaterial {
         AlbedoTexture = TextureAtlas.instance.atlas, ParamsCullMode = SpatialMaterial.CullMode.Back
     };
     UseInBakedLight = true;
 }