Last active
August 21, 2018 04:29
-
-
Save pjc0247/05b34360a664d7f85f6a247990112a5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainScript : MonoBehaviour { | |
public static MainScript instance; | |
void Awake() { | |
instance = this; | |
} | |
public void OnSelectChamp(Champ champ) { | |
// ignore if state is not a `picking` | |
if (state != "PICKING_CHAMPS") return; | |
// write your code here | |
} | |
} | |
class Champ : MonoBehaviour { | |
public void UseAbility() { | |
SendMessage("_UseAbility"); | |
} | |
void OnMouseDown() { | |
MainScript.instance.OnSelectChamp(this); | |
} | |
} | |
class BoostAbility : MonoBehaviour { | |
public void _UseAbility() { | |
/* Ability codes here */ | |
} | |
} | |
class DeboostAbility : MonoBehaviour { | |
public int amount = 5; | |
public void _UseAbility() { | |
/* Ability codes here */ | |
Referee.instance.opponent.Deboost(amount); | |
} | |
} | |
class Referee : Mono { | |
public static Referee instance; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment