std-game-over-screen
Level: Atom | Entity: GameOverScreen | Persistence: runtime
1 states, 5 events, 5 transitions
Live Preview
schema.orb
{
"name": "GameOverScreenOrbital",
"orbitals": [
{
"name": "GameOverScreenOrbital",
"entity": {
"name": "GameOverScreen",
"persistence": "runtime",
"fields": [
{
"name": "id",
"type": "string"
},
{
"name": "name",
"type": "string"
},
{
"name": "description",
"type": "string"
},
{
"name": "status",
"type": "string",
"default": "active",
"values": [
"active",
"inactive",
"pending"
]
},
{
"name": "createdAt",
"type": "string"
},
{
"name": "currentScore",
"type": "number",
"default": 0
},
{
"name": "highScore",
"type": "number",
"default": 0
}
]
},
"traits": [
{
"name": "GameOverScreenGameOver",
"linkedEntity": "GameOverScreen",
"category": "interaction",
"stateMachine": {
"states": [
{
"name": "idle",
"isInitial": true
}
],
"events": [
{
"key": "INIT",
"name": "Initialize"
},
{
"key": "NAVIGATE",
"name": "Navigate"
},
{
"key": "RESTART",
"name": "Restart"
},
{
"key": "RETRY",
"name": "Play Again"
},
{
"key": "QUIT",
"name": "Main Menu"
}
],
"transitions": [
{
"from": "idle",
"to": "idle",
"event": "INIT",
"effects": [
[
"fetch",
"GameOverScreen"
],
[
"render-ui",
"main",
{
"type": "game-over-screen",
"title": "Game Over",
"message": "Better luck next time!",
"currentScore": "@entity.currentScore",
"highScore": "@entity.highScore",
"menuItems": [
{
"label": "Play Again",
"action": "RETRY"
},
{
"label": "Main Menu",
"action": "QUIT"
}
]
}
]
]
},
{
"from": "idle",
"to": "idle",
"event": "NAVIGATE",
"effects": []
},
{
"from": "idle",
"to": "idle",
"event": "RESTART",
"effects": []
},
{
"from": "idle",
"to": "idle",
"event": "RETRY",
"effects": [
[
"render-ui",
"main",
{
"type": "game-over-screen",
"title": "Game Over",
"message": "Better luck next time!",
"currentScore": "@entity.currentScore",
"highScore": "@entity.highScore",
"menuItems": [
{
"label": "Play Again",
"action": "RETRY"
},
{
"label": "Main Menu",
"action": "QUIT"
}
]
}
]
]
},
{
"from": "idle",
"to": "idle",
"event": "QUIT",
"effects": [
[
"render-ui",
"main",
{
"type": "game-over-screen",
"title": "Game Over",
"message": "Better luck next time!",
"currentScore": "@entity.currentScore",
"highScore": "@entity.highScore",
"menuItems": [
{
"label": "Play Again",
"action": "RETRY"
},
{
"label": "Main Menu",
"action": "QUIT"
}
]
}
]
]
}
]
}
}
],
"pages": [
{
"name": "GameOverScreenGameOverPage",
"path": "/gameoverscreens",
"traits": [
{
"ref": "GameOverScreenGameOver"
}
]
}
]
}
],
"description": "Game over screen atom using the `game-over-screen` pattern. Shows final score, high score, and retry/quit actions."
}
Loading preview...
Orbital Visualization
Loading visualization...
Entity Fields
| Field | Type | Default |
|---|---|---|
| id | string | - |
| name | string | - |
| description | string | - |
| status | string | "active" |
| createdAt | string | - |
| currentScore | number | 0 |
| highScore | number | 0 |
States
| State | Type |
|---|---|
| idle | Initial |
Events
| Event | Payload |
|---|---|
| INIT | - |
| NAVIGATE | - |
| RESTART | - |
| RETRY | - |
| QUIT | - |
Transitions
| From | Event | To | Effects |
|---|---|---|---|
| idle | INIT | idle | 2 effects |
| idle | NAVIGATE | idle | - |
| idle | RESTART | idle | - |
| idle | RETRY | idle | 1 effect |
| idle | QUIT | idle | 1 effect |