Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f42e052a1 | |||
| 079baa640b | |||
| 53074ec7d2 | |||
| 64e270c09d |
5 changed files with 29 additions and 10 deletions
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8f241032d24da10a497b5923f532641253c9b84c
|
Subproject commit 7acf6d43b29b713f83b79dbc160f23a531b22453
|
||||||
|
|
@ -55,7 +55,6 @@ public static class SoundManager {
|
||||||
nekoMove = Core.content.Load<SoundEffect>("sounds/neko-move1");
|
nekoMove = Core.content.Load<SoundEffect>("sounds/neko-move1");
|
||||||
bell = Core.content.Load<SoundEffect>("sounds/bell");
|
bell = Core.content.Load<SoundEffect>("sounds/bell");
|
||||||
|
|
||||||
nekoPurrInstance = nekoPurr.CreateInstance();
|
|
||||||
ambienceInstance = ambience.CreateInstance();
|
ambienceInstance = ambience.CreateInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,6 +119,7 @@ public static class SoundManager {
|
||||||
public static void PlayBell() => bell.Play();
|
public static void PlayBell() => bell.Play();
|
||||||
|
|
||||||
public static void StartNekoPurr() {
|
public static void StartNekoPurr() {
|
||||||
|
nekoPurrInstance?.Stop();
|
||||||
nekoPurrInstance = nekoPurr.CreateInstance();
|
nekoPurrInstance = nekoPurr.CreateInstance();
|
||||||
nekoPurrInstance.IsLooped = true;
|
nekoPurrInstance.IsLooped = true;
|
||||||
nekoPurrInstance.Play();
|
nekoPurrInstance.Play();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
using System.Diagnostics;
|
|
||||||
using GlobalClassLib;
|
using GlobalClassLib;
|
||||||
using ONDServer.Enemies;
|
using ONDServer.Enemies;
|
||||||
using ONDServer.Map;
|
using ONDServer.Map;
|
||||||
|
|
@ -15,10 +14,6 @@ public static class GameLogic {
|
||||||
private static readonly OpportunityTimer gamePhaseTimer = new(60_000);
|
private static readonly OpportunityTimer gamePhaseTimer = new(60_000);
|
||||||
public static bool NSecondUpdate{ get; private set; } = false;
|
public static bool NSecondUpdate{ get; private set; } = false;
|
||||||
|
|
||||||
public static MapTile P1Office;
|
|
||||||
public static MapTile P2Office;
|
|
||||||
public static MapTile[] Offices =>[P1Office, P2Office];
|
|
||||||
|
|
||||||
public static int OfficeDoorUsage{ get; set; } = 10;
|
public static int OfficeDoorUsage{ get; set; } = 10;
|
||||||
public static int RemoteDoorUsage{ get; set; } = 3;
|
public static int RemoteDoorUsage{ get; set; } = 3;
|
||||||
public static int LightUsage{ get; set; } = 2;
|
public static int LightUsage{ get; set; } = 2;
|
||||||
|
|
@ -38,8 +33,6 @@ public static class GameLogic {
|
||||||
public static void Init() {
|
public static void Init() {
|
||||||
// Create map
|
// Create map
|
||||||
MapManager.InitMap();
|
MapManager.InitMap();
|
||||||
P1Office = MapManager.Get(10);
|
|
||||||
P2Office = MapManager.Get(14);
|
|
||||||
|
|
||||||
//Send map to client
|
//Send map to client
|
||||||
TileConnector[] connectors = MapManager.GetAllConnectors();
|
TileConnector[] connectors = MapManager.GetAllConnectors();
|
||||||
|
|
@ -63,7 +56,7 @@ public static class GameLogic {
|
||||||
Server.SendPacket(new MapInitPacket{Connectors = connectorsConverted, UpsideDown = false, YourTiles = p1Tiles.ToArray(), OpponentTiles = p2Tiles.ToArray(), LitTiles = neutralTiles.ToArray()}, Server.P1.Peer);
|
Server.SendPacket(new MapInitPacket{Connectors = connectorsConverted, UpsideDown = false, YourTiles = p1Tiles.ToArray(), OpponentTiles = p2Tiles.ToArray(), LitTiles = neutralTiles.ToArray()}, Server.P1.Peer);
|
||||||
Server.SendPacket(new MapInitPacket{Connectors = connectorsConverted, UpsideDown = true, YourTiles = p2Tiles.ToArray(), OpponentTiles = p1Tiles.ToArray(), LitTiles = neutralTiles.ToArray()}, Server.P2.Peer);
|
Server.SendPacket(new MapInitPacket{Connectors = connectorsConverted, UpsideDown = true, YourTiles = p2Tiles.ToArray(), OpponentTiles = p1Tiles.ToArray(), LitTiles = neutralTiles.ToArray()}, Server.P2.Peer);
|
||||||
|
|
||||||
spawnOrder = [[new SpotEnemy(3), new MareEnemy(3)], [new DashEnemy(6)], [new LurkEnemy(3), new NekoEnemy(3)]];
|
spawnOrder = [[new SpotEnemy(3), new MareEnemy(3)], [new DashEnemy(6)]];
|
||||||
spawnOrder.ForEach(l => l.ForEach(e => EnemyManager.AddEnemy(e)));
|
spawnOrder.ForEach(l => l.ForEach(e => EnemyManager.AddEnemy(e)));
|
||||||
|
|
||||||
Thread.Sleep(3000);
|
Thread.Sleep(3000);
|
||||||
|
|
|
||||||
26
README.md
Normal file
26
README.md
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
# OneNightDuel
|
||||||
|
Hra pro 2 hráče inspirovaná hrou Five Nights at Freddy's.
|
||||||
|
|
||||||
|
Dokumentace a teoretická část: `teoreticka-cast.pdf`
|
||||||
|
|
||||||
|
Varování: hra obsahuje jumpscary
|
||||||
|
|
||||||
|
|
||||||
|
## Instalace
|
||||||
|
_(převzato ze sekce INSTALACE v dokumentaci)_
|
||||||
|
|
||||||
|
### Stažení před-kompilované aplikace
|
||||||
|
|
||||||
|
Nevyžaduje předchozí instalaci žádných knihoven.\
|
||||||
|
V sekci Releases (Vydání) na stránce repozitáře lze nalézt zkompilované verze programu pro Linux a Windows. Příslušný archiv je třeba pouze stáhnout a extrahovat.
|
||||||
|
|
||||||
|
### Vlastní kompilace
|
||||||
|
|
||||||
|
Pro případ, že by uživatel chtěl provézt kompilaci na vlastním zařízení. Vyžaduje .Net verze alespoň 9.0. Veškeré kompilační scripty jsou vytvořené pouze pro systém Linux.
|
||||||
|
Kompilaci lze provézt stažením celého repozitáře a spuštěním scriptu `build-linux.sh` – ten program zkompiluje a vytvoří odkaz na spouštěcí soubor. Scripty `build‑self‑contained-linux.sh` a `build‑self‑contained‑win.sh` slouží pro vytvoření verzí aplikace spustitelných bez předchozí instalace jakýchkoli knihoven (těch verzí, které jsou ke stažení v Releases).
|
||||||
|
|
||||||
|
### Spuštění
|
||||||
|
|
||||||
|
Po absolvování jednoho ze zmíněných postupů naleznete v nejvyšším adresáři spouštěcí soubor pro client nebo odkaz na něj (`OneNightDuel` ve verzi pro Linux, `OneNightDuel.bat` ve verzi pro Windows) a script pro spuštění serveru (`launch‑standalone‑server.sh`, respektive `.bat`)
|
||||||
|
|
||||||
|
_(více informací v dokumentaci)_
|
||||||
BIN
teoreticka-cast.pdf
Normal file
BIN
teoreticka-cast.pdf
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue