Skip to content
This repository was archived by the owner on Feb 8, 2019. It is now read-only.

Commit 5b6011a

Browse files
committed
Add PhaseManager
1 parent 0b160f8 commit 5b6011a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
* Copyright (c) 2018 VectorNetworkProject. All rights reserved. MIT license.
4+
*
5+
* GitHub: https://github.com/VectorNetworkProject/TheMix
6+
* Website: https://www.vector-network.tk
7+
*/
8+
9+
/**
10+
* Created by PhpStorm.
11+
* User: InkoHX
12+
* Date: 2018/12/18
13+
* Time: 0:53
14+
*/
15+
16+
namespace VectorNetworkProject\TheMix\game\corepvp;
17+
18+
19+
class PhaseManager
20+
{
21+
/** @var int */
22+
public const MAX_PHASE = 5;
23+
/** @var int $phase */
24+
private static $phase = 1;
25+
26+
public static function addPhase(): void
27+
{
28+
if (self::$phase <= self::MAX_PHASE) return;
29+
self::$phase++;
30+
}
31+
32+
/**
33+
* @return int
34+
*/
35+
public static function getPhase(): int
36+
{
37+
return self::$phase;
38+
}
39+
}

0 commit comments

Comments
 (0)