Test project.

This commit is contained in:
Relintai 2023-06-03 02:40:21 +02:00
parent b7624526a3
commit 001173d673
3 changed files with 43 additions and 1 deletions

View File

@ -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="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
View 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)

View File

@ -11,8 +11,17 @@ config_version=4
[application] [application]
config/name="Sample" config/name="Sample"
run/main_scene="res://Main.tscn"
config/icon="res://icon.png" config/icon="res://icon.png"
[editor_plugins]
enabled=PoolStringArray( "res://addons/pythonscript_repl/plugin.cfg" )
[gdnative]
singletons=[ "res://new_gdnativelibrary.tres" ]
[physics] [physics]
common/enable_pause_aware_picking=true common/enable_pause_aware_picking=true