... | @@ -94,14 +94,17 @@ Le boss sera représenté par une asset de taille 16px par 16px |
... | @@ -94,14 +94,17 @@ Le boss sera représenté par une asset de taille 16px par 16px |
|
left to right direction
|
|
left to right direction
|
|
|
|
|
|
class Game {
|
|
class Game {
|
|
- screen: Screen
|
|
- itsPlayer: Player
|
|
- player: Player
|
|
- itsBattle: Battle
|
|
- battle: Battle
|
|
- itsModel: Model
|
|
- model: Model
|
|
- itsGUI: GUI
|
|
- map: Map
|
|
- itsSaveManager: SaveManager
|
|
- gui: GUI
|
|
- itsSoundManager: SoundManager
|
|
|
|
- itsGamepadController: GamepadController
|
|
+ startGame()
|
|
+ startGame()
|
|
+ endGame()
|
|
+ endGame()
|
|
|
|
+ saveGame()
|
|
|
|
+ loadGame()
|
|
}
|
|
}
|
|
|
|
|
|
class Player {
|
|
class Player {
|
... | @@ -111,7 +114,7 @@ class Player { |
... | @@ -111,7 +114,7 @@ class Player { |
|
- itsDy: int
|
|
- itsDy: int
|
|
- itsX: int
|
|
- itsX: int
|
|
- itsY: int
|
|
- itsY: int
|
|
- team: List<Pokemon>
|
|
- itsTeam: List<Pokemon>
|
|
+ Player(x: int, y: int)
|
|
+ Player(x: int, y: int)
|
|
+ move(dX: int, dY: int): void
|
|
+ move(dX: int, dY: int): void
|
|
+ updateSprite(dX: int, dY: int): void
|
|
+ updateSprite(dX: int, dY: int): void
|
... | @@ -120,8 +123,8 @@ class Player { |
... | @@ -120,8 +123,8 @@ class Player { |
|
}
|
|
}
|
|
|
|
|
|
class Boss {
|
|
class Boss {
|
|
- name: String
|
|
- itsName: String
|
|
- team: List<Pokemon>
|
|
- itsTeam: List<Pokemon>
|
|
+ Boss(name: String)
|
|
+ Boss(name: String)
|
|
+ startBattle(player: Player): void
|
|
+ startBattle(player: Player): void
|
|
}
|
|
}
|
... | @@ -136,7 +139,7 @@ class Pokemon { |
... | @@ -136,7 +139,7 @@ class Pokemon { |
|
- itsDef: int
|
|
- itsDef: int
|
|
- itsSpDef: int
|
|
- itsSpDef: int
|
|
- itsLevel: int
|
|
- itsLevel: int
|
|
- moves: List<Move>
|
|
- itsMoves: List<Move>
|
|
+ executeMove(target: Pokemon, move: Move)
|
|
+ executeMove(target: Pokemon, move: Move)
|
|
+ takeDamage(damage: int)
|
|
+ takeDamage(damage: int)
|
|
+ death()
|
|
+ death()
|
... | @@ -159,8 +162,8 @@ class Move { |
... | @@ -159,8 +162,8 @@ class Move { |
|
}
|
|
}
|
|
|
|
|
|
class Battle {
|
|
class Battle {
|
|
- player: Player
|
|
- itsPlayer: Player
|
|
- opponent: Pokemon
|
|
- itsOpponent: Pokemon
|
|
- isBossBattle: boolean
|
|
- isBossBattle: boolean
|
|
+ startBattle()
|
|
+ startBattle()
|
|
+ endBattle()
|
|
+ endBattle()
|
... | @@ -182,23 +185,19 @@ class Model { |
... | @@ -182,23 +185,19 @@ class Model { |
|
class Data {
|
|
class Data {
|
|
+ getPokemonData(name: String): Pokemon
|
|
+ getPokemonData(name: String): Pokemon
|
|
+ getMoveData(name: String): Move
|
|
+ getMoveData(name: String): Move
|
|
|
|
+ saveGameData(gameData: GameData)
|
|
|
|
+ loadGameData(): GameData
|
|
}
|
|
}
|
|
|
|
|
|
class Map {
|
|
class GUI {
|
|
|
|
- itsScreen: Screen
|
|
- objects: List<Object>
|
|
- objects: List<Object>
|
|
- itsWidth: int
|
|
- itsWidth: int
|
|
- itsHeight: int
|
|
- itsHeight: int
|
|
+ loadMap(file: String)
|
|
+ loadMap(file: String)
|
|
+ updateMap()
|
|
+ updateGUI()
|
|
+ render()
|
|
|
|
}
|
|
|
|
|
|
|
|
class GUI {
|
|
|
|
- itsWidth: int
|
|
|
|
- itsHeight: int
|
|
|
|
+ displayMainMenu()
|
|
+ displayMainMenu()
|
|
+ displayHUD()
|
|
+ displayHUD()
|
|
+ updateGUI()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
class BattleHUD {
|
|
class BattleHUD {
|
... | @@ -214,27 +213,63 @@ class House { |
... | @@ -214,27 +213,63 @@ class House { |
|
+ checkCollision(player: Player): boolean
|
|
+ checkCollision(player: Player): boolean
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class SoundManager {
|
|
|
|
+ playSound(soundType: SoundType)
|
|
|
|
+ playMusic(musicType: MusicType)
|
|
|
|
}
|
|
|
|
|
|
|
|
class GamepadController {
|
|
|
|
+ connectController()
|
|
|
|
+ handleInput(input: GamepadInput)
|
|
|
|
}
|
|
|
|
|
|
|
|
class SaveManager {
|
|
|
|
+ saveGame(game: Game)
|
|
|
|
+ loadGame(game: Game)
|
|
|
|
}
|
|
|
|
|
|
|
|
enum SoundType {
|
|
|
|
Footstep
|
|
|
|
Grass
|
|
|
|
Dirt
|
|
|
|
House
|
|
|
|
Attack
|
|
|
|
KO
|
|
|
|
Damage
|
|
|
|
NewPokemon
|
|
|
|
Dialogue
|
|
|
|
}
|
|
|
|
|
|
|
|
enum MusicType {
|
|
|
|
Ambience
|
|
|
|
Battle
|
|
|
|
House
|
|
|
|
Boss
|
|
|
|
}
|
|
|
|
|
|
|
|
enum GamepadInput {
|
|
|
|
Move
|
|
|
|
Menu
|
|
|
|
SelectAttack
|
|
|
|
}
|
|
|
|
|
|
Game --> Screen
|
|
Game <-- Player
|
|
Game --> Battle
|
|
Game <-- Battle
|
|
Game --> Map
|
|
Game <-- GUI
|
|
Game --> GUI
|
|
Game <-- Model
|
|
Game --> Model
|
|
Model <-- Data
|
|
Model --> Data
|
|
Model <-- SaveManager
|
|
Player --> Pokemon
|
|
Player <-- Pokemon
|
|
Boss --> Pokemon
|
|
Boss <-- Pokemon
|
|
Battle --> Player
|
|
Battle <-- Boss
|
|
Battle --> Boss
|
|
Battle <-- Pokemon
|
|
Battle --> Pokemon
|
|
Pokemon <-- PKTYPE
|
|
Pokemon --> PKTYPE
|
|
Pokemon <-- Move
|
|
Pokemon --> Move
|
|
Move <-- PKTYPE
|
|
Move --> PKTYPE
|
|
Move <-- MOVENATURE
|
|
Move --> MOVENATURE
|
|
GUI <-- Screen
|
|
Map --> Screen
|
|
GUI <-- House
|
|
Screen --> GUI
|
|
Screen <-- BattleHUD
|
|
Screen --> BattleHUD
|
|
Battle <-- Move
|
|
Battle --> Move
|
|
BattleHUD <-- Battle
|
|
BattleHUD --> Battle
|
|
|
|
Map --> House
|
|
|
|
``` |
|
``` |
|
|
|
\ No newline at end of file |