コード例 #1
0
ファイル: MobReward.g.cs プロジェクト: thierbig/wizards-unite
        public void MergeFrom(MobReward other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.RewardCase)
            {
            case RewardOneofCase.Focus:
                if (Focus == null)
                {
                    Focus = new global::WUProtos.Data.Mob.MobRewardFocus();
                }
                Focus.MergeFrom(other.Focus);
                break;

            case RewardOneofCase.Time:
                if (Time == null)
                {
                    Time = new global::WUProtos.Data.Mob.MobRewardTime();
                }
                Time.MergeFrom(other.Time);
                break;

            case RewardOneofCase.VictoryPoints:
                if (VictoryPoints == null)
                {
                    VictoryPoints = new global::WUProtos.Data.Mob.MobRewardVictoryPoints();
                }
                VictoryPoints.MergeFrom(other.VictoryPoints);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
コード例 #2
0
 public override void executeCard()
 {
     foreach (GameObject player2 in base.players)
     {
         VictoryPoints vp = player2.GetComponent <VictoryPoints>();
         if (player2 != base.player)
         {
             vp.removeVP(5);
         }
     }
 }
コード例 #3
0
 public void checkVP()
 {
     foreach (GameObject player in players)
     {
         VictoryPoints VP = player.GetComponent <VictoryPoints>();
         if (VP.getVP() >= 20)
         {
             //load Victory Screen?
         }
     }
 }
コード例 #4
0
 void UpdateCanvas()
 {
     //   Debug.Log("PLAYER CANVAS " + C.MyId + ": UpdateCanvas");
     //EnergyText.text = Energy.ToString();
     //LifeText.text = Life.ToString();
     //PointsText.text = VictoryPoints.ToString();
     //LifeSlider.value = Life;
     //EnergySlider.value = Energy;
     //PointSlider.value = VictoryPoints;
     C.UpdateAvatar(Life, Energy, VictoryPoints);
     Sliders[0].value    = Life;
     Sliders[1].value    = VictoryPoints;
     Sliders[2].value    = Energy;
     SlidersText[0].text = Life.ToString();
     SlidersText[1].text = VictoryPoints.ToString();
     SlidersText[2].text = Energy.ToString();
 }
コード例 #5
0
    public override void executeCard()
    {
        VictoryPoints vp         = base.player.GetComponent <VictoryPoints>();
        TokyoCheck    tokyoCheck = base.player.GetComponent <TokyoCheck>();

        vp.addVP(2);

        if (!tokyoCheck.inTokyo())
        {
            foreach (GameObject player2 in base.players)
            {
                TokyoCheck check = player2.GetComponent <TokyoCheck>();
                if (check.inTokyo() && (player2 != base.player))
                {
                    check.leaveTokyo();
                }
            }

            tokyoCheck.enterTokyo();
        }
    }
コード例 #6
0
ファイル: MobReward.g.cs プロジェクト: thierbig/wizards-unite
        public override int GetHashCode()
        {
            int hash = 1;

            if (rewardCase_ == RewardOneofCase.Focus)
            {
                hash ^= Focus.GetHashCode();
            }
            if (rewardCase_ == RewardOneofCase.Time)
            {
                hash ^= Time.GetHashCode();
            }
            if (rewardCase_ == RewardOneofCase.VictoryPoints)
            {
                hash ^= VictoryPoints.GetHashCode();
            }
            hash ^= (int)rewardCase_;
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }