コード例 #1
0
ファイル: PickupHandler.cs プロジェクト: igetgames/Heartbeat
 private void Awake()
 {
     if ((metagame_ = Metagame.GetInstance()) == null)
     {
         this.enabled = false;
         return;
     }
 }
コード例 #2
0
ファイル: Metagame.cs プロジェクト: igetgames/Heartbeat
    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_;
    }
コード例 #3
0
ファイル: Heartbeat.cs プロジェクト: igetgames/Heartbeat
 public void SetMetagame(Metagame metagame)
 {
     metagame_ = metagame;
 }
コード例 #4
0
ファイル: PingReceiver.cs プロジェクト: igetgames/Heartbeat
    private void Awake()
    {
        if ((metagame_ = Metagame.GetInstance()) == null)
        {
            this.enabled = false;
            return;
        }

        SetState(PingReceiverState.Awake);
    }
コード例 #5
0
ファイル: StoreWardrobe.cs プロジェクト: eddaly/elvis
 // 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;
         }
     }
 }
コード例 #6
0
ファイル: PersistentData.cs プロジェクト: eddaly/elvis
 public static bool IsUpgradeUnlocked(Metagame.Item item)
 {
     return item.unlockLevel <= CurrentLevel();
 }
コード例 #7
0
ファイル: PersistentData.cs プロジェクト: eddaly/elvis
 public static bool HasItem(Metagame.ConsumableUnlocked item)
 {
     return ((int)consumableUnlocked & (int)item) != 0;
 }
コード例 #8
0
ファイル: PersistentData.cs プロジェクト: eddaly/elvis
 public static bool HasItem(Metagame.UpgradeItems item)
 {
     return ((int)upgradeItems & (int)item) != 0;
 }