diff --git a/sjplayer/src/sjplayer/ElementInterface.d b/sjplayer/src/sjplayer/ElementInterface.d new file mode 100644 index 0000000..5ed8a58 --- /dev/null +++ b/sjplayer/src/sjplayer/ElementInterface.d @@ -0,0 +1,26 @@ +/// License: MIT +module sjplayer.ElementInterface; + +import gl4d; + +/// +interface ElementInterface { + public: + /// + static struct DamageCalculationResult { + /// An amount of the damage. (0~1) + float damage; + /// A nearness of the point. (0~1) + float nearness; + } + + /// + DamageCalculationResult CalculateDamage(vec2 p1, vec2 p2) const; +} + +/// +interface ElementDrawerInterface { + public: + /// + void Draw(); +}