-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a40ce0c
commit a960050
Showing
3 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
test/gdscript/out | ||
test/project.godot | ||
test/project.godot | ||
Submit.bat | ||
gdscript.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,41 @@ | ||
# Haxe: GDScript Target | ||
Compile Haxe to GDScript 2.0 like any other Haxe target. Made using [Reflaxe](https://github.com/RobertBorghese/reflaxe). | ||
|
||
This project is incomplete and experimental. No guarantee it will be completed. | ||
|
||
How to install: | ||
|
||
```hxml | ||
# In your compile.hxml file... | ||
# Enable the library | ||
# This will not work currently as this lib hasn't been added to haxelib | ||
-lib gdscript-target | ||
-lib gdscript | ||
# Set output folder to "./output" | ||
-D gdscript-output=output | ||
``` | ||
|
||
## How it outputs | ||
|
||
* As GDScript outputs one file per class, each class, regardless of module, receives its own file. | ||
- [x] As GDScript outputs one file per class, each class, regardless of module, receives its own file. | ||
|
||
- [x] A custom version of the Haxe standard library is made for GDScript (check out `std/gdscript/_std`) | ||
|
||
* A custom version of the Haxe standard library is made for GDScript (check out `std/gdscript/_std`) | ||
- [ ] Bindings to the Godot classes/functions (check out `std/godot`) | ||
|
||
* If GDScript is being generated, conditional compilation can be used with the `gdscript` define. | ||
- [x] If GDScript is being generated, conditional compilation can be used with the `gdscript` define. | ||
```haxe | ||
#if gdscript | ||
doSomethingOnlyForGDScript(); | ||
#end | ||
``` | ||
|
||
* GDScript can be injected directly using: | ||
- [x] GDScript can be injected directly using: | ||
```haxe | ||
untyped __gdscript__("print(123)"); | ||
``` | ||
|
||
* GDScript meta can be defined using `@:meta`, though there should be defined metadata for each existing attribute in GDScript. | ||
- [ ] GDScript meta can be defined using `@:meta`, though there should be defined metadata for each existing attribute in GDScript. | ||
```haxe | ||
@:meta(onready) var someVal = get_node("myNode") | ||
``` | ||
|
||
- [ ] (Unfinished) Haxe enum support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters