[add] Added ElementInterface.
This commit is contained in:
parent
9c5fb1af8c
commit
84b0033790
26
sjplayer/src/sjplayer/ElementInterface.d
Normal file
26
sjplayer/src/sjplayer/ElementInterface.d
Normal file
@ -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();
|
||||||
|
}
|
Reference in New Issue
Block a user