-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
279 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"sprites":[{"name":"card_bg","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":0,"y":0,"w":140,"h":250},"packed":{"x":0,"y":0,"w":140,"h":250}}]},{"name":"card_underline","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":3,"name":"open"}],"packs":[{"frame":{"x":0,"y":0,"w":20,"h":200},"packed":{"x":140,"y":0,"w":20,"h":200}},{"frame":{"x":0,"y":0,"w":20,"h":200},"packed":{"x":160,"y":0,"w":20,"h":200}},{"frame":{"x":0,"y":0,"w":20,"h":200},"packed":{"x":180,"y":0,"w":20,"h":200}},{"frame":{"x":0,"y":0,"w":20,"h":200},"packed":{"x":200,"y":0,"w":20,"h":200}}]},{"name":"palette","tags":[{"from":0,"to":0,"name":"1"},{"from":1,"to":1,"name":"2"},{"from":2,"to":2,"name":"3"},{"from":3,"to":3,"name":"4"},{"from":4,"to":4,"name":"5"}],"packs":[{"frame":{"x":0,"y":0,"w":8,"h":8},"packed":{"x":248,"y":340,"w":8,"h":8}},{"frame":{"x":0,"y":0,"w":8,"h":8},"packed":{"x":256,"y":340,"w":8,"h":8}},{"frame":{"x":0,"y":0,"w":8,"h":8},"packed":{"x":264,"y":340,"w":8,"h":8}},{"frame":{"x":0,"y":0,"w":8,"h":8},"packed":{"x":272,"y":340,"w":8,"h":8}},{"frame":{"x":0,"y":0,"w":8,"h":8},"packed":{"x":280,"y":340,"w":8,"h":8}}]},{"name":"title_bg","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":0,"y":0,"w":248,"h":40},"packed":{"x":0,"y":340,"w":248,"h":40}}]},{"name":"transition","tags":[{"from":0,"to":5,"name":"cover"}],"packs":[{"frame":{"x":0,"y":0,"w":80,"h":45},"packed":{"x":140,"y":200,"w":80,"h":45}},{"frame":{"x":0,"y":0,"w":80,"h":45},"packed":{"x":0,"y":250,"w":80,"h":45}},{"frame":{"x":0,"y":0,"w":80,"h":45},"packed":{"x":80,"y":250,"w":80,"h":45}},{"frame":{"x":0,"y":0,"w":80,"h":45},"packed":{"x":160,"y":250,"w":80,"h":45}},{"frame":{"x":0,"y":0,"w":80,"h":45},"packed":{"x":0,"y":295,"w":80,"h":45}},{"frame":{"x":0,"y":0,"w":80,"h":45},"packed":{"x":80,"y":295,"w":80,"h":45}}]}]} | ||
{"sprites":[{"name":"main_card_bg","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":0,"y":0,"w":420,"h":520},"packed":{"x":0,"y":0,"w":420,"h":520}}]}]} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { TextureFilter, TextureSampler } from 'blah' | ||
import { Color } from 'blah' | ||
import { Rect, Vec2, Mat3x2 } from 'blah' | ||
import { Time, App, batch, Batch, Target } from 'blah' | ||
|
||
import Content from './content' | ||
|
||
import { Play } from './play' | ||
|
||
|
||
export type AnimData = { | ||
name: string | ||
} | ||
|
||
export class Anim extends Play { | ||
|
||
get data() { | ||
return this._data as AnimData | ||
} | ||
|
||
get sprite() { | ||
return Content.find_sprite(this.data.name) | ||
} | ||
|
||
_animation: string = 'idle' | ||
get animation() { | ||
return this.sprite.get(this._animation) | ||
} | ||
|
||
_frame: number = 0 | ||
|
||
get frame() { | ||
return this.animation?.frames[this._frame] | ||
|
||
} | ||
|
||
get subtexture() { | ||
return this.frame?.image | ||
} | ||
|
||
get duration() { | ||
return this.frame?.duration | ||
} | ||
|
||
|
||
_draw(batch: Batch) { | ||
|
||
if (!this.subtexture) { | ||
return | ||
} | ||
|
||
|
||
batch.stex(this.subtexture, this.position, Color.white) | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.