[add] Added a template of ScheduledController for shapes..
This commit is contained in:
parent
f2703bda59
commit
a39c9f5001
@ -1,29 +1,14 @@
|
|||||||
/// License: MIT
|
/// License: MIT
|
||||||
module sjplayer.CircleElementScheduledController;
|
module sjplayer.CircleElementScheduledController;
|
||||||
|
|
||||||
import std.typecons;
|
|
||||||
|
|
||||||
import sjplayer.CircleElement,
|
import sjplayer.CircleElement,
|
||||||
sjplayer.ElementScheduledControllerFactory,
|
sjplayer.ElementScheduledControllerFactory,
|
||||||
sjplayer.ScheduledController;
|
sjplayer.ScheduledController,
|
||||||
|
sjplayer.ShapeElementScheduledController;
|
||||||
|
|
||||||
///
|
///
|
||||||
alias CircleElementScheduledController = ScheduledController!(
|
alias CircleElementScheduledController =
|
||||||
CircleElement,
|
ShapeElementScheduledController!CircleElement;
|
||||||
[
|
|
||||||
"damage": "damage",
|
|
||||||
"nearness_coe": "nearness_coe",
|
|
||||||
"weight": "weight",
|
|
||||||
"smooth": "smooth",
|
|
||||||
"color_r": "color.r",
|
|
||||||
"color_g": "color.g",
|
|
||||||
"color_b": "color.b",
|
|
||||||
"color_a": "color.a",
|
|
||||||
]
|
|
||||||
);
|
|
||||||
static assert(CircleElementScheduledController.AliveManagementAvailable);
|
|
||||||
static assert(CircleElementScheduledController.MatrixModificationAvailable);
|
|
||||||
static assert(CircleElementScheduledController.AutoInitializationAvailable);
|
|
||||||
|
|
||||||
///
|
///
|
||||||
alias CircleElementScheduledControllerFactory =
|
alias CircleElementScheduledControllerFactory =
|
||||||
|
28
sjplayer/src/sjplayer/ShapeElementScheduledController.d
Normal file
28
sjplayer/src/sjplayer/ShapeElementScheduledController.d
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
/// License: MIT
|
||||||
|
module sjplayer.ShapeElementScheduledController;
|
||||||
|
|
||||||
|
import sjplayer.CircleElement,
|
||||||
|
sjplayer.ElementInterface,
|
||||||
|
sjplayer.ElementScheduledControllerFactory,
|
||||||
|
sjplayer.ScheduledController;
|
||||||
|
|
||||||
|
///
|
||||||
|
template ShapeElementScheduledController(Element)
|
||||||
|
if (is(Element : ElementInterface)) {
|
||||||
|
alias ShapeElementScheduledController = ScheduledController!(
|
||||||
|
Element,
|
||||||
|
[
|
||||||
|
"damage": "damage",
|
||||||
|
"nearness_coe": "nearness_coe",
|
||||||
|
"weight": "weight",
|
||||||
|
"smooth": "smooth",
|
||||||
|
"color_r": "color.r",
|
||||||
|
"color_g": "color.g",
|
||||||
|
"color_b": "color.b",
|
||||||
|
"color_a": "color.a",
|
||||||
|
]
|
||||||
|
);
|
||||||
|
static assert(ShapeElementScheduledController.AliveManagementAvailable);
|
||||||
|
static assert(ShapeElementScheduledController.MatrixModificationAvailable);
|
||||||
|
static assert(ShapeElementScheduledController.AutoInitializationAvailable);
|
||||||
|
}
|
@ -1,29 +1,14 @@
|
|||||||
/// License: MIT
|
/// License: MIT
|
||||||
module sjplayer.SquareElementScheduledController;
|
module sjplayer.SquareElementScheduledController;
|
||||||
|
|
||||||
import std.typecons;
|
|
||||||
|
|
||||||
import sjplayer.ElementScheduledControllerFactory,
|
import sjplayer.ElementScheduledControllerFactory,
|
||||||
sjplayer.ScheduledController,
|
sjplayer.ScheduledController,
|
||||||
|
sjplayer.ShapeElementScheduledController,
|
||||||
sjplayer.SquareElement;
|
sjplayer.SquareElement;
|
||||||
|
|
||||||
///
|
///
|
||||||
alias SquareElementScheduledController = ScheduledController!(
|
alias SquareElementScheduledController =
|
||||||
SquareElement,
|
ShapeElementScheduledController!SquareElement;
|
||||||
[
|
|
||||||
"damage": "damage",
|
|
||||||
"nearness_coe": "nearness_coe",
|
|
||||||
"weight": "weight",
|
|
||||||
"smooth": "smooth",
|
|
||||||
"color_r": "color.r",
|
|
||||||
"color_g": "color.g",
|
|
||||||
"color_b": "color.b",
|
|
||||||
"color_a": "color.a",
|
|
||||||
]
|
|
||||||
);
|
|
||||||
static assert(SquareElementScheduledController.AliveManagementAvailable);
|
|
||||||
static assert(SquareElementScheduledController.MatrixModificationAvailable);
|
|
||||||
static assert(SquareElementScheduledController.AutoInitializationAvailable);
|
|
||||||
|
|
||||||
///
|
///
|
||||||
alias SquareElementScheduledControllerFactory =
|
alias SquareElementScheduledControllerFactory =
|
||||||
|
Reference in New Issue
Block a user