-
-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #577 from WoofWoof0/add-snail-pet
Add snail pet
- Loading branch information
Showing
13 changed files
with
91 additions
and
0 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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,70 @@ | ||
import { PetColor } from '../../common/types'; | ||
import { BasePetType } from '../basepettype'; | ||
import { 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', | ||
]; |
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