Elin Modding Docs Doc
Loading...
Searching...
No Matches
LayerMiniGame.cs
1using System;
2using UnityEngine;
3
4// Token: 0x0200059D RID: 1437
5public class LayerMiniGame : ELayer
6{
7 // Token: 0x0600276A RID: 10090 RVA: 0x000DF590 File Offset: 0x000DD790
8 public override void OnAfterInit()
9 {
10 ELayer.pc.SetNoGoal();
11 EInput.Consume(true, 1);
12 ELayer.ui.layerFloat.SetActive(false);
13 if (WidgetCurrentTool.Instance)
14 {
15 WidgetCurrentTool.Instance.SetActive(false);
16 }
17 if (WidgetEquip.Instance)
18 {
19 WidgetEquip.Instance.SetActive(false);
20 }
21 }
22
23 // Token: 0x0600276B RID: 10091 RVA: 0x000DF5F0 File Offset: 0x000DD7F0
24 public override void OnUpdateInput()
25 {
26 if (this.mini == null && EInput.leftMouse.clicked)
27 {
28 SE.Click();
29 ELayer.pc.stamina.Mod(-10);
30 ELayer.player.EndTurn(true);
31 Debug.Log(ELayer.ui.IsPauseGame);
32 string str = ELayer.scene.actionMode.ShouldPauseGame.ToString();
33 string str2 = "/";
34 ActionMode actionMode = ELayer.scene.actionMode;
35 Debug.Log(str + str2 + ((actionMode != null) ? actionMode.ToString() : null));
36 Debug.Log(ELayer.scene.actionMode.gameSpeed);
37 Debug.Log(ELayer.pc.turn);
38 if (ELayer.pc.isDead || ELayer.pc.IsDisabled)
39 {
40 this.Close();
41 }
42 }
43 }
44
45 // Token: 0x0600276C RID: 10092 RVA: 0x000DF6D3 File Offset: 0x000DD8D3
46 public override bool OnBack()
47 {
48 if (this.mini != null && !this.mini.CanExit())
49 {
50 SE.BeepSmall();
51 return false;
52 }
53 return base.OnBack();
54 }
55
56 // Token: 0x0600276D RID: 10093 RVA: 0x000DF6F8 File Offset: 0x000DD8F8
57 public void Run()
58 {
59 if (this.mini == null)
60 {
61 return;
62 }
63 this.mini.balance.lastCoin = ELayer.pc.GetCurrency("casino_coin");
64 this.mini.balance.changeCoin = 0;
65 this.mini.OnActivate();
66 }
67
68 // Token: 0x0600276E RID: 10094 RVA: 0x000DF74C File Offset: 0x000DD94C
69 public override void OnKill()
70 {
71 if (this.mini != null)
72 {
73 this.mini.Deactivate();
74 }
75 ELayer.ui.layerFloat.SetActive(true);
76 if (WidgetCurrentTool.Instance)
77 {
78 WidgetCurrentTool.Instance.SetActive(true);
79 }
80 if (WidgetEquip.Instance)
81 {
82 WidgetEquip.Instance.SetActive(true);
83 }
84 }
85
86 // Token: 0x040015E4 RID: 5604
87 public MiniGame mini;
88
89 // Token: 0x040015E5 RID: 5605
90 public MiniGame.Type type;
91}