You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Implement animation slice drawing in CanvasItem
* Added a function to ignore subsequent commands if they don't fall within the slice. * This will be used by the new TileMap to properly provide animated tiles.
This commit is contained in:
@@ -180,6 +180,7 @@ public:
|
||||
TYPE_PARTICLES,
|
||||
TYPE_TRANSFORM,
|
||||
TYPE_CLIP_IGNORE,
|
||||
TYPE_ANIMATION_SLICE,
|
||||
};
|
||||
|
||||
Command *next;
|
||||
@@ -286,6 +287,17 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
struct CommandAnimationSlice : public Command {
|
||||
double animation_length = 0;
|
||||
double slice_begin = 0;
|
||||
double slice_end = 0;
|
||||
double offset = 0;
|
||||
|
||||
CommandAnimationSlice() {
|
||||
type = TYPE_ANIMATION_SLICE;
|
||||
}
|
||||
};
|
||||
|
||||
struct ViewportRender {
|
||||
RenderingServer *owner;
|
||||
void *udata;
|
||||
|
||||
Reference in New Issue
Block a user