switched to go coded animation system, LDTK is not used for this anymore
This commit is contained in:
@@ -2,7 +2,6 @@ package game
|
||||
|
||||
import (
|
||||
"image"
|
||||
"log"
|
||||
"log/slog"
|
||||
"openquell/assets"
|
||||
"openquell/components"
|
||||
@@ -198,27 +197,6 @@ func LevelToSlice(game *Game, level *ldtkgo.Level, tilesize int) (Map, Map) {
|
||||
}
|
||||
tileRect := entity.TileRect
|
||||
|
||||
animationtrigger := util.GetPropertyString(entity, "AnimationTrigger")
|
||||
slog.Debug("got trigger", "trigger", animationtrigger)
|
||||
|
||||
//animateondestruct := util.GetPropertyBool(entity, "AnimateOnDestruct")
|
||||
// FIXME: also check for AnimationLoop and other animation reasons
|
||||
// if animateondestruct {
|
||||
if animationtrigger != "" {
|
||||
tile.AnimateOnDestruct = true
|
||||
|
||||
animation := util.GetPropertyString(entity, "AnimateSpriteSheet")
|
||||
if animation != "" {
|
||||
if !util.Exists(assets.Animations, animation) {
|
||||
log.Fatalf("entity %s refers to non existent animation set %s",
|
||||
entity.Identifier, animation)
|
||||
}
|
||||
}
|
||||
|
||||
tile.AnimationSpriteSheet = assets.Animations[animation]
|
||||
tile.AnimationTrigger = animationtrigger
|
||||
}
|
||||
|
||||
tile.Sprite = tileset.SubImage(
|
||||
image.Rect(tileRect.X, tileRect.Y,
|
||||
tileRect.X+tileRect.W,
|
||||
|
||||
Reference in New Issue
Block a user