AustinEast / echo

Simple Physics Library written in Haxe
https://austineast.dev/echo
MIT License
144 stars 27 forks source link

Am I Using Macros.add_data correctly? #38

Open GeezerLMAO opened 2 years ago

GeezerLMAO commented 2 years ago

So I want to add a isOnFloor data to the body using your example

--macro echo.Macros.add_data("isOnFloor", "Bool")

But when I try to access it just spits an error

image

This is the hxml if it will help

-cp src

-lib heaps
-lib hlsdl
-lib deepnightLibs
-lib ldtk-haxe-api
-lib echo

-hl bin/Test.hl

-main Main
-D windowSize=1024x576

--macro echo.Macros.add_data("entity", "objects.Entity")
--macro echo.Macros.add_data("isOnFloor", "Bool")
AustinEast commented 10 months ago

Interesting! Hadn't thought about using the macros to add primitive data types 😄 It was intended for Classes, but I think its worth supporting.