Changes
Page history
Update Osztály diagram
authored
Apr 11, 2022
by
Horváth István
Show whitespace changes
Inline
Side-by-side
Osztály-diagram.md
View page @
7667df6b
...
@@ -220,6 +220,35 @@ Color <-- IGameOverview
...
@@ -220,6 +220,35 @@ Color <-- IGameOverview
Minden osztály, ami
`...Data`
elnevezéssel rendelkezik, az a
`ScriptableObject`
-ből, minden más osztály pedig a
`MonoBehaviour`
-ből származik le.
Minden osztály, ami
`...Data`
elnevezéssel rendelkezik, az a
`ScriptableObject`
-ből, minden más osztály pedig a
`MonoBehaviour`
-ből származik le.
```
plantuml
```
plantuml
package Presentation.World {
package Presentation.World {
class TileHighlight {
+ SetDimmed(bool): void
+ SetRadius(float, float): void
+ ScaleIntensity(float): void
+ SetData(TileHighlightData): void
}
class TileHighlightData {
+ LightColor: Color
+ Intensity: float
+ DimmedIntensity: float
}
class OverviewConfig {
+ FightingPhaseDuration: float
}
class EconomyConfig {
+ StartingBalance: int
+ RoundBasePay: int
+ NewUnitsKilledPay: int
+ TotalUnitsPurchasedPay: int
}
class HealthbarController {
+ SetHealth(float): void
+ MakeVisible(): void
}
class GameManager {
class GameManager {
+ MainMenuScene: string { constant }
+ MainMenuScene: string { constant }
+ SimulationScene: string { constant }
+ SimulationScene: string { constant }
...
@@ -230,34 +259,15 @@ package Presentation.World {
...
@@ -230,34 +259,15 @@ package Presentation.World {
}
}
class World {
class World {
- _units: Dictionary<Logic.Data.World.Unit, Unit>
+ LogicToPresentation(Logic.Data.World.Unit): Unit
+ Tile: GameObject
+ HighlightTile(TilPosition): TileHighlight
+ Barrack: GameObject
+ HighlightTile(GameObject): TileHighlight
+ Obstacle: GameObject
+ RemoveHighlight(GameObject): void
+ Tower: GameObject
+ RemoveHighlight(TilePosition): void
+ Castle: GameObject
+ TilePadding: float
+ Unit: GameObject
- _map: GameObject[,]
- Start(): void
- Update(float): void
- OnUnitDeployed(UnitDeployedEvent): void
- OnUnitMovedTile(UnitMovedTileEvent): void
- OnUnitDestroyed(UnitDestroyedEvent): void
- OnTowerBuilt(TowerBuiltEvent): void
- InstantiateTower(GameObject, Logic.Data.World.Tower): GameObject
- InstantiateTile(int, int, GameWorld): GameObject
- InstantiateTile(GameObject, Vector3, TileObject): GameObject
}
}
class Tile {
class Tile {
- TileData: TileData
- _spriteRenderer: SpriteRenderer
+ Position:TilePosition
+ Position:TilePosition
- Start(): void
}
}
class UnitData {
class UnitData {
...
@@ -270,13 +280,7 @@ package Presentation.World {
...
@@ -270,13 +280,7 @@ package Presentation.World {
}
}
class Unit {
class Unit {
- redUnitData: UnitData
+ UpdateHealth(): void
- blueUnitData: UnitData
- _data: Logic.Data.World.Unit
- _spriteRenderer: SpriteRenderer
- Awake(): void
- FixedUpdate(): void
+ SetData(Logic.Data.World.Unit): void
+ SetData(Logic.Data.World.Unit): void
+ DestroyUnit(): void
+ DestroyUnit(): void
}
}
...
@@ -293,12 +297,6 @@ package Presentation.World {
...
@@ -293,12 +297,6 @@ package Presentation.World {
}
}
class Castle extends Structure {
class Castle extends Structure {
- blueCastleData: CastleData
- redCastleData: CastleData
- _data: Logic.Data.World.Castle
- _spriteRenderer: SpriteRenderer
- Start(): void
+ SetData(Logic.Data.World.Castle): void
+ SetData(Logic.Data.World.Castle): void
}
}
...
@@ -310,22 +308,11 @@ package Presentation.World {
...
@@ -310,22 +308,11 @@ package Presentation.World {
}
}
class Projectile {
class Projectile {
- blueProjectileData: ProjectileData
- redProjectileData: ProjectileData
- _spriteRenderer: SpriteRenderer
- _teamColor: Logic.Data.Color
- Start(): void
+ SetTeamColor(Logic.Data.Color): void
+ SetTeamColor(Logic.Data.Color): void
}
}
class Tower extends Structure {
class Tower extends Structure {
- blueTowerData: TowerData
+ DestroyTower(): void
- redTowerData: TowerData
- _data: Logic.Data.World.Tower
- _spriteRenderer: SpriteRenderer
- Start(): void
+ SetData(Logic.Data.World.Tower): void
+ SetData(Logic.Data.World.Tower): void
}
}
...
@@ -337,19 +324,9 @@ package Presentation.World {
...
@@ -337,19 +324,9 @@ package Presentation.World {
}
}
class Obstacle extends Structure {
class Obstacle extends Structure {
- obstacleData: ObstacleData
- _spriteRenderer: SpriteRenderer
- Start(): void
}
}
class Barrack extends Structure {
class Barrack extends Structure {
- blueBarrackData: BarrackData
- redBarrackData: BarrackData
- _data: Logic.Data.World.Barrack
- _spriteRenderer: SpriteRenderer
- Start(): void
+ SetData(Logic.Data.World.Barrack): void
+ SetData(Logic.Data.World.Barrack): void
}
}
...
@@ -372,34 +349,12 @@ package Presentation.World {
...
@@ -372,34 +349,12 @@ package Presentation.World {
}
}
class SimulationCamera {
class SimulationCamera {
- minZoomLevel: float
- maxZoomLevel: float
- zoomSensitivity: float
- zoomSpeed: float
- panSensitivity: Vector2
- panSpeed: float
- _cam: camera
- _isRightButtondown: bool
- _panTarget: Vector3
- _zoomTarget: float
- Start(): void
- Update(): void
- SetupCallbacks(): void
}
}
class SimulationManager {
class SimulationManager {
+ WorldWidth: int
+ WorldHeight: int
+ Seed: int
- mainCamera: Camera
+ IsPaused: bool
+ IsPaused: bool
+ GameOverview: IGameOverview
+ GameOverview: IGameOverview
- Awake(): void
- Update(): void
- FixedUpdate(): void
+ SpawnProjectile(Tower): Projectile
+ ResumeGame(): void
+ ResumeGame(): void
+ PauseGame(): void
+ PauseGame(): void
...
@@ -411,6 +366,9 @@ package Presentation.World {
...
@@ -411,6 +366,9 @@ package Presentation.World {
Unit o-- UnitData
Unit o-- UnitData
TileHighlight o-- TileHighlightData
World o-- TileHighlight
World o-- Tile
World o-- Tile
Tile o-- TileData
Tile o-- TileData
Tile o-- Structure
Tile o-- Structure
...
...
...
...