コード例 #1
0
 public override void OnCampScoreUpdated(ref SCampScoreUpdateParam prm)
 {
     if (this.ContextProxy != null)
     {
         this.ContextProxy.OnCampScoreUpdated(ref prm);
     }
 }
コード例 #2
0
		private void OnCampScoreUpdated(ref SCampScoreUpdateParam prm)
		{
			if (this.WinnerEvaluation != null)
			{
				this.WinnerEvaluation.OnCampScoreUpdated(ref prm);
			}
			if (this.LoserEvaluation != null)
			{
				this.LoserEvaluation.OnCampScoreUpdated(ref prm);
			}
		}
コード例 #3
0
 public virtual void OnCampScoreUpdated(ref SCampScoreUpdateParam prm)
 {
     for (int i = this.Conditions.Count - 1; (i >= 0) && (i < this.Conditions.Count); i--)
     {
         IStarCondition condition = this.Conditions[i];
         if (condition != null)
         {
             condition.OnCampScoreUpdated(ref prm);
         }
     }
 }
コード例 #4
0
 private bool ShouldCare(ref SCampScoreUpdateParam prm)
 {
     if (prm.CampType == COM_PLAYERCAMP.COM_PLAYERCAMP_MID || prm.CampType >= COM_PLAYERCAMP.COM_PLAYERCAMP_COUNT)
     {
         return(false);
     }
     if (this.TargetCamp == 0)
     {
         return(prm.CampType == Singleton <GamePlayerCenter> .instance.hostPlayerCamp);
     }
     return(prm.CampType != Singleton <GamePlayerCenter> .instance.hostPlayerCamp);
 }
コード例 #5
0
 private bool ShouldCare(ref SCampScoreUpdateParam prm)
 {
     if (prm.CampType == null || prm.CampType >= 3)
     {
         return(false);
     }
     if (this.TargetCamp == 0)
     {
         return(prm.CampType == Singleton <GamePlayerCenter> .get_instance().hostPlayerCamp);
     }
     return(prm.CampType != Singleton <GamePlayerCenter> .get_instance().hostPlayerCamp);
 }
コード例 #6
0
        public virtual void OnCampScoreUpdated(ref SCampScoreUpdateParam prm)
        {
            int num = this.Conditions.get_Count() - 1;

            while (num >= 0 && num < this.Conditions.get_Count())
            {
                IStarCondition starCondition = this.Conditions.get_Item(num);
                if (starCondition != null)
                {
                    starCondition.OnCampScoreUpdated(ref prm);
                }
                num--;
            }
        }
コード例 #7
0
ファイル: CampInfo.cs プロジェクト: TonyDongGuaPi/joework
        private void OnUpdateCampPts(bool bUpdateScore, bool bUpdateHeadPts, PoolObjHandle <ActorRoot> inSrc, PoolObjHandle <ActorRoot> inAtker)
        {
            int num = this._campScore;

            if (!bUpdateScore)
            {
                num = -1;
            }
            int num2 = this.m_headPoints;

            if (!bUpdateHeadPts)
            {
                num2 = -1;
            }
            if (this.onCampScoreChanged != null)
            {
                this.onCampScoreChanged(this.campType, num, num2);
            }
            SCampScoreUpdateParam sCampScoreUpdateParam = new SCampScoreUpdateParam(num, num2, inSrc, inAtker, this.campType);

            Singleton <GameEventSys> .get_instance().SendEvent <SCampScoreUpdateParam>(GameEventDef.Event_CampScoreUpdated, ref sCampScoreUpdateParam);
        }
コード例 #8
0
 public override void OnCampScoreUpdated(ref SCampScoreUpdateParam prm)
 {
     if (this.ShouldCare(ref prm))
     {
         this.CachedSource   = prm.src;
         this.CachedAttacker = prm.atker;
         if ((this.DataSubType == RES_STAR_CONDITION_DATA_SUB_TYPE.RES_STAR_CONDITION_DATA_HEAD_POINTS) && (prm.HeadPoints >= 0))
         {
             this.Score = prm.HeadPoints;
         }
         else if ((this.DataSubType == RES_STAR_CONDITION_DATA_SUB_TYPE.RES_STAR_CONDITION_DATA_HEADS) && (prm.HeadCount >= 0))
         {
             this.Score = prm.HeadCount;
         }
         bool flag = SmartCompare.Compare <int>(this.Score, this.TargetScore, this.operation);
         if (this.bCheckResults != flag)
         {
             this.bCheckResults = flag;
             this.TriggerChangedEvent();
         }
     }
 }
コード例 #9
0
ファイル: CampInfo.cs プロジェクト: wujiangu/wanshiwu0.1
        private void OnUpdateCampPts(bool bUpdateScore, bool bUpdateHeadPts, PoolObjHandle <ActorRoot> inSrc, PoolObjHandle <ActorRoot> inAtker)
        {
            int inCampScore = this._campScore;

            if (!bUpdateScore)
            {
                inCampScore = -1;
            }
            int headPoints = this.m_headPoints;

            if (!bUpdateHeadPts)
            {
                headPoints = -1;
            }
            if (this.onCampScoreChanged != null)
            {
                this.onCampScoreChanged(this.campType, inCampScore, headPoints);
            }
            SCampScoreUpdateParam prm = new SCampScoreUpdateParam(inCampScore, headPoints, inSrc, inAtker, this.campType);

            Singleton <GameEventSys> .instance.SendEvent <SCampScoreUpdateParam>(GameEventDef.Event_CampScoreUpdated, ref prm);
        }
コード例 #10
0
        public override void OnCampScoreUpdated(ref SCampScoreUpdateParam prm)
        {
            if (!this.ShouldCare(ref prm))
            {
                return;
            }
            this.CachedSource   = prm.src;
            this.CachedAttacker = prm.atker;
            if (this.DataSubType == 1 && prm.HeadPoints >= 0)
            {
                this.Score = prm.HeadPoints;
            }
            else if (this.DataSubType == 2 && prm.HeadCount >= 0)
            {
                this.Score = prm.HeadCount;
            }
            bool flag = SmartCompare.Compare <int>(this.Score, this.TargetScore, this.operation);

            if (this.bCheckResults != flag)
            {
                this.bCheckResults = flag;
                this.TriggerChangedEvent();
            }
        }
コード例 #11
0
 public virtual void OnCampScoreUpdated(ref SCampScoreUpdateParam prm)
 {
 }
コード例 #12
0
 public override void OnCampScoreUpdated(ref SCampScoreUpdateParam prm)
 {
     this.UpdateCheckResults();
 }