private void Awake() { if ((metagame_ = Metagame.GetInstance()) == null) { this.enabled = false; return; } }
public static Metagame GetInstance() { if (instance_ == null) { GameObject metagameObject = GameObject.FindGameObjectWithTag("Metagame"); if ((metagameObject == null) || ((instance_ = metagameObject.GetComponent<Metagame>()) == null)) { Debug.LogError("Couldn't locate a GO with the \"Metagame\" tag or it's missing the Metagame script."); return null; } } return instance_; }
public void SetMetagame(Metagame metagame) { metagame_ = metagame; }
private void Awake() { if ((metagame_ = Metagame.GetInstance()) == null) { this.enabled = false; return; } SetState(PingReceiverState.Awake); }
// Get Metagame types from costumeSelected and upgradeSelected private void GetSelectedMetagameCostume(out Metagame.UpgradeItems costumeUpgrade, out Metagame.Item metagameUpgrade) { if (costumeSelected == 1) { if (upgradeSelected == 1) { costumeUpgrade = Metagame.UpgradeItems.COSTUME1_UPGRADE0; metagameUpgrade = Metagame.costume1_upgrade0; } else if (upgradeSelected == 2) { costumeUpgrade = Metagame.UpgradeItems.COSTUME1_UPGRADE1; metagameUpgrade = Metagame.costume1_upgrade1; } else { costumeUpgrade = Metagame.UpgradeItems.COSTUME1_UPGRADE2; metagameUpgrade = Metagame.costume1_upgrade2; } } else if (costumeSelected == 2) { if (upgradeSelected == 1) { costumeUpgrade = Metagame.UpgradeItems.COSTUME2_UPGRADE0; metagameUpgrade = Metagame.costume2_upgrade0; } else if (upgradeSelected == 2) { costumeUpgrade = Metagame.UpgradeItems.COSTUME2_UPGRADE1; metagameUpgrade = Metagame.costume2_upgrade1; } else { costumeUpgrade = Metagame.UpgradeItems.COSTUME2_UPGRADE2; metagameUpgrade = Metagame.costume2_upgrade2; } } else if (costumeSelected == 3) { if (upgradeSelected == 1) { costumeUpgrade = Metagame.UpgradeItems.COSTUME3_UPGRADE0; metagameUpgrade = Metagame.costume3_upgrade0; } else if (upgradeSelected == 2) { costumeUpgrade = Metagame.UpgradeItems.COSTUME3_UPGRADE1; metagameUpgrade = Metagame.costume3_upgrade1; } else { costumeUpgrade = Metagame.UpgradeItems.COSTUME3_UPGRADE2; metagameUpgrade = Metagame.costume3_upgrade2; } } else { if (upgradeSelected == 1) { costumeUpgrade = Metagame.UpgradeItems.COSTUME4_UPGRADE0; metagameUpgrade = Metagame.costume4_upgrade0; } else if (upgradeSelected == 2) { costumeUpgrade = Metagame.UpgradeItems.COSTUME4_UPGRADE1; metagameUpgrade = Metagame.costume4_upgrade1; } else { costumeUpgrade = Metagame.UpgradeItems.COSTUME4_UPGRADE2; metagameUpgrade = Metagame.costume4_upgrade2; } } }
public static bool IsUpgradeUnlocked(Metagame.Item item) { return item.unlockLevel <= CurrentLevel(); }
public static bool HasItem(Metagame.ConsumableUnlocked item) { return ((int)consumableUnlocked & (int)item) != 0; }
public static bool HasItem(Metagame.UpgradeItems item) { return ((int)upgradeItems & (int)item) != 0; }