Skip to content

Commit

Permalink
add snail.ts.
Browse files Browse the repository at this point in the history
  • Loading branch information
WoofWoof0 committed Jun 12, 2024
1 parent 547124c commit 27e7b0a
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions src/panel/pets/snail.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { PetColor } from "../../common/types";
import { BasePetType } from "../basepettype";
import { ISequenceTree } from "../sequences";
import { RunRightState, States } from "../states";

export class Snail extends BasePetType {
label = 'snail';
static possibleColors: [PetColor.brown];

sequence = {
startingState: States.sitIdle,
sequenceStates: [
{
state: States.sitIdle,
possibleNextStates: [States.walkRight, States.runRight],
},
{
state: States.walkRight,
possibleNextStates: [States.walkLeft, States.runLeft],
},
{
state: States.runRight,
possibleNextStates: [States.walkLeft, States.runLeft],
},
{
state: States.walkLeft,
possibleNextStates: [
States.sitIdle,
States.walkRight,
States.runRight,
],
},
{
state: States.runLeft,
possibleNextStates: [
States.sitIdle,
States.walkRight,
States.runRight,
],
},
{
state: States.chase,
possibleNextStates: [States.idleWithBall],
},
{
state: States.idleWithBall,
possibleNextStates: [
States.walkRight,
States.walkLeft,
States.runLeft,
States.runRight,
],
},
],
};

get emoji(): string {
return '🐌';
}

get hello(): string {
return 'hello! 👋';
}
}

export const SNAIL_NAMES: ReadonlyArray<string> = [
'Flash',
'Sonwy',
'Shally',
'Taggy',
];

0 comments on commit 27e7b0a

Please sign in to comment.