moving moods in separate namespace

This commit is contained in:
Peli de Halleux 2018-01-16 16:21:02 -08:00
parent f1880897d4
commit a4ebf4c746
3 changed files with 28 additions and 24 deletions

View File

@ -1,16 +1,16 @@
{ {
"brick.Mood": "A mood", "brick.Mood": "A mood",
"brick.Mood.show": "Shows the mood on the EV3", "brick.Mood.show": "Shows the mood on the EV3",
"brick.angry": "An angry mood", "moods.angry": "An angry mood",
"brick.awake": "A awake mood", "moods.awake": "A awake mood",
"brick.dizzy": "A dizzy mood", "moods.dizzy": "A dizzy mood",
"brick.knockedOut": "A knocked out mood", "moods.knockedOut": "A knocked out mood",
"brick.love": "In love mood", "moods.love": "In love mood",
"brick.middleLeft": "Looking around left", "moods.middleLeft": "Looking around left",
"brick.middleRight": "Looking around right", "moods.middleRight": "Looking around right",
"brick.neutral": "In a neutral mood", "moods.neutral": "In a neutral mood",
"brick.sad": "A sad mood", "moods.sad": "A sad mood",
"brick.sleeping": "A sleeping mood", "moods.sleeping": "A sleeping mood",
"brick.tired": "A tired mood", "moods.tired": "A tired mood",
"brick.winking": "In laughing mood" "moods.winking": "In laughing mood"
} }

View File

@ -1,6 +1,8 @@
{ {
"brick.Mood.show|block": "show mood %mood=mood_image_picker", "brick.Mood.show|block": "show mood %mood=mood_image_picker",
"brick|block": "brick", "brick|block": "brick",
"moods|block": "moods",
"{id:category}Brick": "Brick", "{id:category}Brick": "Brick",
"{id:category}Moods": "Moods",
"{id:group}Screen": "Screen" "{id:group}Screen": "Screen"
} }

View File

@ -40,76 +40,78 @@ namespace brick {
export function __moodImagePicker(mood: Mood): Mood { export function __moodImagePicker(mood: Mood): Mood {
return mood; return mood;
} }
}
namespace moods {
/** /**
* A sleeping mood * A sleeping mood
*/ */
//% fixedInstance jres=images.eyesSleeping //% fixedInstance jres=images.eyesSleeping
export const sleeping = new Mood(images.eyesSleeping, sounds.expressionsSnoring, BrickLight.OrangePulse); export const sleeping = new brick.Mood(images.eyesSleeping, sounds.expressionsSnoring, BrickLight.OrangePulse);
/** /**
* A awake mood * A awake mood
*/ */
//% fixedInstance jres=images.eyesAwake //% fixedInstance jres=images.eyesAwake
export const awake = new Mood(images.eyesAwake, sounds.informationActivate, BrickLight.Orange); export const awake = new brick.Mood(images.eyesAwake, sounds.informationActivate, BrickLight.Orange);
/** /**
* A tired mood * A tired mood
*/ */
//% fixedInstance jres=images.eyesTiredMiddle //% fixedInstance jres=images.eyesTiredMiddle
export const tired = new Mood(images.eyesTiredMiddle, sounds.expressionsSneezing, BrickLight.OrangeFlash); export const tired = new brick.Mood(images.eyesTiredMiddle, sounds.expressionsSneezing, BrickLight.OrangeFlash);
/** /**
* An angry mood * An angry mood
*/ */
//% fixedInstance jres=images.eyesAngry //% fixedInstance jres=images.eyesAngry
export const angry = new Mood(images.eyesAngry, sounds.animalsDogGrowl, BrickLight.RedPulse); export const angry = new brick.Mood(images.eyesAngry, sounds.animalsDogGrowl, BrickLight.RedPulse);
/** /**
* A sad mood * A sad mood
*/ */
//% fixedInstance jres=images.eyesTear //% fixedInstance jres=images.eyesTear
export const sad = new Mood(images.eyesTear, sounds.animalsDogWhine, BrickLight.Red); export const sad = new brick.Mood(images.eyesTear, sounds.animalsDogWhine, BrickLight.Red);
/** /**
* A dizzy mood * A dizzy mood
*/ */
//% fixedInstance jres=images.eyesDizzy //% fixedInstance jres=images.eyesDizzy
export const dizzy = new Mood(images.eyesDizzy, sounds.expressionsUhOh, BrickLight.OrangeFlash); export const dizzy = new brick.Mood(images.eyesDizzy, sounds.expressionsUhOh, BrickLight.OrangeFlash);
/** /**
* A knocked out mood * A knocked out mood
*/ */
//% fixedInstance jres=images.eyesKnockedOut //% fixedInstance jres=images.eyesKnockedOut
export const knockedOut = new Mood(images.eyesKnockedOut, sounds.informationError, BrickLight.RedFlash); export const knockedOut = new brick.Mood(images.eyesKnockedOut, sounds.informationError, BrickLight.RedFlash);
/** /**
* Looking around left * Looking around left
*/ */
//% fixedInstance jres=images.eyesMiddleLeft //% fixedInstance jres=images.eyesMiddleLeft
export const middleLeft = new Mood(images.eyesMiddleLeft, sounds.informationAnalyze, BrickLight.Off); export const middleLeft = new brick.Mood(images.eyesMiddleLeft, sounds.informationAnalyze, BrickLight.Off);
/** /**
* Looking around right * Looking around right
*/ */
//% fixedInstance jres=images.eyesMiddleRight //% fixedInstance jres=images.eyesMiddleRight
export const middleRight = new Mood(images.eyesMiddleRight, sounds.informationAnalyze, BrickLight.Off); export const middleRight = new brick.Mood(images.eyesMiddleRight, sounds.informationAnalyze, BrickLight.Off);
/** /**
* In love mood * In love mood
*/ */
//% fixedInstance jres=images.eyesLove //% fixedInstance jres=images.eyesLove
export const love = new Mood(images.eyesLove, sounds.expressionsMagicWand, BrickLight.GreenPulse); export const love = new brick.Mood(images.eyesLove, sounds.expressionsMagicWand, BrickLight.GreenPulse);
/** /**
* In laughing mood * In laughing mood
*/ */
//% fixedInstance jres=images.eyesWinking //% fixedInstance jres=images.eyesWinking
export const winking = new Mood(images.eyesWinking, sounds.expressionsLaughing1, BrickLight.GreenFlash); export const winking = new brick.Mood(images.eyesWinking, sounds.expressionsLaughing1, BrickLight.GreenFlash);
/** /**
* In a neutral mood * In a neutral mood
*/ */
//% fixedInstance jres=images.eyesNeutral //% fixedInstance jres=images.eyesNeutral
export const neutral = new Mood(images.eyesNeutral, undefined, BrickLight.Green); export const neutral = new brick.Mood(images.eyesNeutral, undefined, BrickLight.Green);
} }