|
|
@@ -19,18 +19,27 @@ public class GameRuleView : MonoBehaviour
|
|
|
|
|
|
void Start()
|
|
|
{
|
|
|
- GameMgr.ins.addLockerForGamePause(this);
|
|
|
+ if (GlobalData.pkMatchType != PKMatchType.OnlinePK) {
|
|
|
+ GameMgr.ins.addLockerForGamePause(this);
|
|
|
+ }
|
|
|
this.Click();
|
|
|
}
|
|
|
|
|
|
void OnDestroy()
|
|
|
{
|
|
|
createLock = false;
|
|
|
- GameMgr.ins.removeLockerForGamePause(this);
|
|
|
+ if (GlobalData.pkMatchType != PKMatchType.OnlinePK) {
|
|
|
+ GameMgr.ins.removeLockerForGamePause(this);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public void Click() {
|
|
|
- int[] rule = (int[]) this.GetType().GetField("rule" + GameMgr.gameType).GetValue(this);
|
|
|
+ int[] rule = null;
|
|
|
+ if (GameMgr.gameType == 1) {
|
|
|
+ rule = rule1;
|
|
|
+ } else if (GameMgr.gameType == 2 || GameMgr.gameType == 9) {
|
|
|
+ rule = rule2;
|
|
|
+ }
|
|
|
if (ruleLookIndex >= rule.Length) {
|
|
|
Destroy(this.gameObject);
|
|
|
GameMgr.ins.FinishGameRuleGuide();
|