Odstraněny nepoužívané proměnné v GameLogic, opraven bug způsobjící nekonečné přehrávání předení, přidána dokumentace
This commit is contained in:
parent
0b750f05b5
commit
64e270c09d
3 changed files with 2 additions and 9 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
BIN
dokumentace.pdf
Normal file
BIN
dokumentace.pdf
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue