Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
MiniGame_Blackjack Class Reference
Inheritance diagram for MiniGame_Blackjack:
ModMinigame< Blackjack >

Public Member Functions

override bool CanExit ()
 
override void OnActivate ()
 
override void SlidePosition (float w)
 
override void OnDeactivate ()
 
- Public Member Functions inherited from ModMinigame< Blackjack >
void Load ()
 
void Kill ()
 

Public Attributes

Blackjack prefab
 
- Public Attributes inherited from ModMinigame< Blackjack >
game
 

Properties

override string id [get]
 

Detailed Description

Definition at line 4 of file MiniGame_Blackjack.cs.

Member Function Documentation

◆ CanExit()

override bool MiniGame_Blackjack.CanExit ( )
inline

Definition at line 10 of file MiniGame_Blackjack.cs.

11 {
12 if (!(game == null))
13 {
14 return game.btnExit.gameObject.activeSelf;
15 }
16 return true;
17 }

References ModMinigame< Blackjack >.game.

◆ OnActivate()

override void MiniGame_Blackjack.OnActivate ( )
inline

Definition at line 19 of file MiniGame_Blackjack.cs.

20 {
21 if (!game)
22 {
23 if (!prefab)
24 {
25 prefab = Resources.Load<Blackjack>("BlackJack");
26 }
27 Debug.Log(prefab);
28 go = Object.Instantiate(prefab.gameObject);
29 Debug.Log(go);
30 game = go.GetComponentInChildren<Blackjack>();
31 }
32 SetAudioMixer(go);
33 Blackjack.game = new Game_Blackjack
34 {
35 Deactivate = base.Deactivate,
36 OnPlay = base.OnPlay,
37 ModChangeCoin = delegate(int a)
38 {
39 balance.changeCoin += a;
40 },
41 ModLastCoin = delegate(int a)
42 {
43 balance.lastCoin += a;
44 },
45 LastCoin = () => balance.lastCoin
46 };
47 game.btnExit.SetOnClick(base.Exit);
48 game.Money = balance.lastCoin;
49 }

References Debug, ModMinigame< Blackjack >.game, and prefab.

◆ OnDeactivate()

override void MiniGame_Blackjack.OnDeactivate ( )
inline

Definition at line 56 of file MiniGame_Blackjack.cs.

57 {
58 balance.changeCoin = game.Money - balance.lastCoin;
59 if (!game.isGameStarted)
60 {
61 balance.changeCoin += game.chips;
62 }
63 Kill();
64 }

References ModMinigame< Blackjack >.game, and ModMinigame< Blackjack >.Kill().

◆ SlidePosition()

override void MiniGame_Blackjack.SlidePosition ( float  w)
inline

Definition at line 51 of file MiniGame_Blackjack.cs.

52 {
53 game.transCanvas.anchoredPosition = new Vector2(w / 2f, 75f);
54 }

Member Data Documentation

◆ prefab

Blackjack MiniGame_Blackjack.prefab

Definition at line 6 of file MiniGame_Blackjack.cs.

Referenced by OnActivate().

Property Documentation

◆ id

override string MiniGame_Blackjack.id
get

Definition at line 8 of file MiniGame_Blackjack.cs.


The documentation for this class was generated from the following file: