mirror of
https://git.kittycat.homes/zoe/codename-routes.git
synced 2024-08-15 03:18:26 +00:00
fuck around with native script
This commit is contained in:
parent
f0ea635b71
commit
a95e7cd77b
5 changed files with 25 additions and 3 deletions
8
godot/native/StateServer.gdns
Normal file
8
godot/native/StateServer.gdns
Normal file
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="NativeScript" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://native/nativelibrary.gdnlib" type="GDNativeLibrary" id=1]
|
||||
|
||||
[resource]
|
||||
resource_name = "StateServer"
|
||||
class_name = "StateServer"
|
||||
library = ExtResource( 1 )
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://world/state_server.gdns" type="Script" id=1]
|
||||
[ext_resource path="res://native/StateServer.gdns" type="Script" id=1]
|
||||
|
||||
[node name="StateServer" type="Node"]
|
||||
script = ExtResource( 1 )
|
||||
|
|
14
godot/native/nativelibrary.gdnlib
Normal file
14
godot/native/nativelibrary.gdnlib
Normal file
|
@ -0,0 +1,14 @@
|
|||
[entry]
|
||||
|
||||
X11.64="res://native/libroutes_native.so"
|
||||
|
||||
[dependencies]
|
||||
|
||||
X11.64=[ ]
|
||||
|
||||
[general]
|
||||
|
||||
singleton=false
|
||||
load_once=true
|
||||
symbol_prefix="godot_"
|
||||
reloadable=true
|
|
@ -1,7 +1,7 @@
|
|||
extends Node
|
||||
|
||||
var server = preload("res://native/StateServer.tscn").instance()
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
|
||||
func _ready():
|
||||
add_child(server)
|
||||
print(server.a)
|
||||
|
|
|
@ -15,7 +15,7 @@ mode = 1
|
|||
tile_set = ExtResource( 1 )
|
||||
cell_size = Vector2( 32, 16 )
|
||||
format = 1
|
||||
tile_data = PoolIntArray( -65538, 0, 131075, -65537, 0, 131073, -2, 0, 131073, -1, 0, 131075 )
|
||||
tile_data = PoolIntArray( -65538, 0, 131075, -65537, 0, 131073, -131072, 0, 0, -2, 0, 131073, -1, 0, 131075, -65536, 0, 0, 0, 0, 0, 65536, 0, 0, 131072, 0, 0, 196608, 0, 0 )
|
||||
|
||||
[node name="Worldcam" type="Camera2D" parent="."]
|
||||
current = true
|
||||
|
|
Loading…
Reference in a new issue