From 1c28b3a64433d84365e6edf45bf705534201a081 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Tue, 31 Mar 2020 21:47:09 +0200 Subject: [PATCH] Initialized classes & file structure --- .gitignore | 1 + data/config/mainConfig.json | 0 src/entities/Collidable.py | 5 +++++ src/entities/Entity.py | 5 +++++ src/entities/Interactable.py | 5 +++++ src/entities/Npc.py | 7 +++++++ src/entities/Pickupable.py | 5 +++++ src/entities/Player.py | 6 ++++++ src/entities/Statistics.py | 6 ++++++ src/game/EventManager.py | 3 +++ src/game/Game.py | 6 ++++++ src/game/Map.py | 4 ++++ src/game/Screen.py | 4 ++++ src/game/SoundManager.py | 3 +++ src/game/TerrainTile.py | 3 +++ src/game/Timer.py | 4 ++++ src/ui/Ui.py | 3 +++ src/ui/UiBar.py | 5 +++++ src/ui/UiButton.py | 5 +++++ src/ui/UiElement.py | 2 ++ src/ui/UiImage.py | 5 +++++ src/ui/UiText.py | 5 +++++ src/ui/UiWindow.py | 5 +++++ 23 files changed, 97 insertions(+) create mode 100644 .gitignore create mode 100644 data/config/mainConfig.json create mode 100644 src/entities/Collidable.py create mode 100644 src/entities/Entity.py create mode 100644 src/entities/Interactable.py create mode 100644 src/entities/Npc.py create mode 100644 src/entities/Pickupable.py create mode 100644 src/entities/Player.py create mode 100644 src/entities/Statistics.py create mode 100644 src/game/EventManager.py create mode 100644 src/game/Game.py create mode 100644 src/game/Map.py create mode 100644 src/game/Screen.py create mode 100644 src/game/SoundManager.py create mode 100644 src/game/TerrainTile.py create mode 100644 src/game/Timer.py create mode 100644 src/ui/Ui.py create mode 100644 src/ui/UiBar.py create mode 100644 src/ui/UiButton.py create mode 100644 src/ui/UiElement.py create mode 100644 src/ui/UiImage.py create mode 100644 src/ui/UiText.py create mode 100644 src/ui/UiWindow.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85e7c1d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea/ diff --git a/data/config/mainConfig.json b/data/config/mainConfig.json new file mode 100644 index 0000000..e69de29 diff --git a/src/entities/Collidable.py b/src/entities/Collidable.py new file mode 100644 index 0000000..ebe0f2f --- /dev/null +++ b/src/entities/Collidable.py @@ -0,0 +1,5 @@ +import src.entities.Entity as Entity + + +class Collidable(Entity): + pass diff --git a/src/entities/Entity.py b/src/entities/Entity.py new file mode 100644 index 0000000..b9d4d43 --- /dev/null +++ b/src/entities/Entity.py @@ -0,0 +1,5 @@ +class Entity: + def __init__(self): + self.texture + self.pos + self.id diff --git a/src/entities/Interactable.py b/src/entities/Interactable.py new file mode 100644 index 0000000..7720fdf --- /dev/null +++ b/src/entities/Interactable.py @@ -0,0 +1,5 @@ +import src.entities.Entity as Entity + + +class Interactable(Entity): + pass diff --git a/src/entities/Npc.py b/src/entities/Npc.py new file mode 100644 index 0000000..45f460e --- /dev/null +++ b/src/entities/Npc.py @@ -0,0 +1,7 @@ +import src.entities.Collidable as Collidable + + +class Npc(Collidable): + def __init__(self): + self.path + self.speed diff --git a/src/entities/Pickupable.py b/src/entities/Pickupable.py new file mode 100644 index 0000000..b59b728 --- /dev/null +++ b/src/entities/Pickupable.py @@ -0,0 +1,5 @@ +import src.entities.Interactable as Interactable + + +class Pickupable(Interactable): + pass diff --git a/src/entities/Player.py b/src/entities/Player.py new file mode 100644 index 0000000..0cc7578 --- /dev/null +++ b/src/entities/Player.py @@ -0,0 +1,6 @@ +import src.entities.Entity as Entity + + +class Player(Entity): + def __init__(self): + self.statistics diff --git a/src/entities/Statistics.py b/src/entities/Statistics.py new file mode 100644 index 0000000..18b4cc9 --- /dev/null +++ b/src/entities/Statistics.py @@ -0,0 +1,6 @@ +class Statistics: + def __init__(self): + self.hp + self.hunger + self.thirst + self.stamina diff --git a/src/game/EventManager.py b/src/game/EventManager.py new file mode 100644 index 0000000..4548656 --- /dev/null +++ b/src/game/EventManager.py @@ -0,0 +1,3 @@ +class EventManager: + def __init__(self): + self.player diff --git a/src/game/Game.py b/src/game/Game.py new file mode 100644 index 0000000..a783f92 --- /dev/null +++ b/src/game/Game.py @@ -0,0 +1,6 @@ +class Game: + def __init__(self): + self.resolution + self.windowName + self.fps + self.timer diff --git a/src/game/Map.py b/src/game/Map.py new file mode 100644 index 0000000..8a4b1c9 --- /dev/null +++ b/src/game/Map.py @@ -0,0 +1,4 @@ +class Map: + def __init__(self): + self.terrain + self.entites = [] diff --git a/src/game/Screen.py b/src/game/Screen.py new file mode 100644 index 0000000..a749f7e --- /dev/null +++ b/src/game/Screen.py @@ -0,0 +1,4 @@ +class Screen: + def __init__(self): + self.map + self.ui diff --git a/src/game/SoundManager.py b/src/game/SoundManager.py new file mode 100644 index 0000000..987e9f0 --- /dev/null +++ b/src/game/SoundManager.py @@ -0,0 +1,3 @@ +class SoundManager: + def __init__(self): + self.files = [] diff --git a/src/game/TerrainTile.py b/src/game/TerrainTile.py new file mode 100644 index 0000000..ec906e5 --- /dev/null +++ b/src/game/TerrainTile.py @@ -0,0 +1,3 @@ +class TerrainTile: + def __init__(self): + self.tiles = [] diff --git a/src/game/Timer.py b/src/game/Timer.py new file mode 100644 index 0000000..4fbc44b --- /dev/null +++ b/src/game/Timer.py @@ -0,0 +1,4 @@ +class Timer: + def __init__(self): + self.time + self.cycle diff --git a/src/ui/Ui.py b/src/ui/Ui.py new file mode 100644 index 0000000..289b0d4 --- /dev/null +++ b/src/ui/Ui.py @@ -0,0 +1,3 @@ +class Ui(): + def __init__(self): + self.elements = [] diff --git a/src/ui/UiBar.py b/src/ui/UiBar.py new file mode 100644 index 0000000..a8dac52 --- /dev/null +++ b/src/ui/UiBar.py @@ -0,0 +1,5 @@ +import src.ui.UiElement as UiElement + + +class UiBar(UiElement): + pass diff --git a/src/ui/UiButton.py b/src/ui/UiButton.py new file mode 100644 index 0000000..7c64ced --- /dev/null +++ b/src/ui/UiButton.py @@ -0,0 +1,5 @@ +import src.ui.UiElement as UiElement + + +class UiButton(UiElement): + pass diff --git a/src/ui/UiElement.py b/src/ui/UiElement.py new file mode 100644 index 0000000..a398959 --- /dev/null +++ b/src/ui/UiElement.py @@ -0,0 +1,2 @@ +class UiElement: + pass diff --git a/src/ui/UiImage.py b/src/ui/UiImage.py new file mode 100644 index 0000000..d8cd485 --- /dev/null +++ b/src/ui/UiImage.py @@ -0,0 +1,5 @@ +import src.ui.UiElement as UiElement + + +class UiImage(UiElement): + pass diff --git a/src/ui/UiText.py b/src/ui/UiText.py new file mode 100644 index 0000000..2200d35 --- /dev/null +++ b/src/ui/UiText.py @@ -0,0 +1,5 @@ +import src.ui.UiElement as UiElement + + +class UiText(UiElement): + pass diff --git a/src/ui/UiWindow.py b/src/ui/UiWindow.py new file mode 100644 index 0000000..1063ef4 --- /dev/null +++ b/src/ui/UiWindow.py @@ -0,0 +1,5 @@ +import src.ui.UiElement as UiElement + + +class UiWindow(UiElement): + pass