mirror of
https://github.com/Relintai/gdnative_python_sample.git
synced 2024-11-12 10:25:12 +01:00
Test project.
This commit is contained in:
parent
b7624526a3
commit
001173d673
@ -1,3 +1,13 @@
|
||||
[gd_scene format=2]
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://icon.png" type="Texture" id=1]
|
||||
[ext_resource path="res://TestSprite.py" type="Script" id=2]
|
||||
|
||||
[node name="Main" type="Node"]
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="."]
|
||||
position = Vector2( 446, 268 )
|
||||
|
||||
[node name="TestSprite" type="Sprite" parent="Node2D"]
|
||||
texture = ExtResource( 1 )
|
||||
script = ExtResource( 2 )
|
||||
|
23
game/TestSprite.py
Normal file
23
game/TestSprite.py
Normal file
@ -0,0 +1,23 @@
|
||||
from pandemonium import exposed, export
|
||||
from pandemonium import *
|
||||
|
||||
|
||||
@exposed
|
||||
class TestSprite(Sprite):
|
||||
|
||||
# member variables here, example:
|
||||
#a = export(int)
|
||||
#b = export(str, default='foo')
|
||||
|
||||
adelta = 0.0
|
||||
|
||||
def _ready(self):
|
||||
"""
|
||||
Called every time the node is added to the scene.
|
||||
Initialization here.
|
||||
"""
|
||||
pass
|
||||
|
||||
def _process(self, delta):
|
||||
self.adelta += delta * 10
|
||||
self.position = Vector2(PMath.sin(self.adelta) * 40, PMath.cos(self.adelta) * 40)
|
@ -11,8 +11,17 @@ config_version=4
|
||||
[application]
|
||||
|
||||
config/name="Sample"
|
||||
run/main_scene="res://Main.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
enabled=PoolStringArray( "res://addons/pythonscript_repl/plugin.cfg" )
|
||||
|
||||
[gdnative]
|
||||
|
||||
singletons=[ "res://new_gdnativelibrary.tres" ]
|
||||
|
||||
[physics]
|
||||
|
||||
common/enable_pause_aware_picking=true
|
||||
|
Loading…
Reference in New Issue
Block a user