Changes
Page history
Update Osztály diagram
authored
Feb 26, 2022
by
Bahil Botond
Hide whitespace changes
Inline
Side-by-side
Osztály-diagram.md
View page @
ee2477c8
# Modell (logika)
# Modell (logika)
```
plantuml
```
plantuml
package Logic.Data{
package Logic.Data{
package Logic.World{
package Logic.World{
...
@@ -30,35 +28,29 @@ package Logic.World{
...
@@ -30,35 +28,29 @@ package Logic.World{
}
}
abstract Building{
abstract Building
extends TileObject
{
+ Owner(): GameTeam{get}
+ Owner(): GameTeam{get}
}
}
class Obstacle{
class Obstacle
extends TileObject
{
}
}
class Tower{
class Tower
extends Building
{
+ BuildingCost(): int{get}
+ BuildingCost(): int{get}
+ UpgradeCost(): int{get}
+ UpgradeCost(): int{get}
+ Target(): Unit{get}
+ Target(): Unit{get}
+ Level(): int{get}
+ Level(): int{get}
}
}
class Barrack{
class Barrack
extends Building
{
}
}
class Castle{
class Castle
extends Building
{
+ Health(): float{get}
+ Health(): float{get}
}
}
TileObject <|-- Building
TileObject <|-- Obstacle
Building <|-- Tower
Building <|-- Castle
Building <|-- Barrack
GameWorld o-- TileObject
GameWorld o-- TileObject
TileObject "1" o-- TilePosition
TileObject "1" o-- TilePosition
Tower "1" o-- ITowerTypeData
Tower "1" o-- ITowerTypeData
...
@@ -99,6 +91,7 @@ enum GameTeam{
...
@@ -99,6 +91,7 @@ enum GameTeam{
}
}
```
```
# Nézet, UI nélkül (azaz VFX, SFX)
# Nézet, UI nélkül (azaz VFX, SFX)
...
@@ -301,7 +294,7 @@ interface ICommandResult {
...
@@ -301,7 +294,7 @@ interface ICommandResult {
+ IsSuccess() : bool
+ IsSuccess() : bool
}
}
class BiCommandResult <<sealed>> {
class BiCommandResult <<sealed>>
implements ICommandResult
{
+ Success : BiCommandResult
+ Success : BiCommandResult
+ Failure : BiCommandResult
+ Failure : BiCommandResult
}
}
...
@@ -311,12 +304,14 @@ CommandDispatcher -d-> ICommandResult
...
@@ -311,12 +304,14 @@ CommandDispatcher -d-> ICommandResult
BaseCommand --> ICommandResult
BaseCommand --> ICommandResult
"BaseCommand<BiCommandResult>" --|> BaseCommand
abstract "BaseCommand<BiCommandResult>" extends BaseCommand{
}
"BaseCommand<BiCommandResult>" --> BiCommandResult
"BaseCommand<BiCommandResult>" --> BiCommandResult
BiCommandResult --|> ICommandResult
}
}
```
```
# Különböző eventek kifejtve
Mindegyik
`...Event`
, ami nem interfész, az a
`BaseEvent`
alosztálya. Ez nincs jelölve a diagrammon a jobb átláthatóság érdekében.
Mindegyik
`...Event`
, ami nem interfész, az a
`BaseEvent`
alosztálya. Ez nincs jelölve a diagrammon a jobb átláthatóság érdekében.
...
@@ -383,7 +378,7 @@ class UnitDamagedEvent implements IUnitEvent {
...
@@ -383,7 +378,7 @@ class UnitDamagedEvent implements IUnitEvent {
+ Attacker() : Tower {get}
+ Attacker() : Tower {get}
}
}
class UnitDestroyedEvent
implements IUnitEvent
class UnitDestroyedEvent implements IUnitEvent
}
}
```
```
...
...
...
...