public override void OnCampScoreUpdated(ref SCampScoreUpdateParam prm) { if (this.ContextProxy != null) { this.ContextProxy.OnCampScoreUpdated(ref prm); } }
private void OnCampScoreUpdated(ref SCampScoreUpdateParam prm) { if (this.WinnerEvaluation != null) { this.WinnerEvaluation.OnCampScoreUpdated(ref prm); } if (this.LoserEvaluation != null) { this.LoserEvaluation.OnCampScoreUpdated(ref prm); } }
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); } } }
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); }
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); }
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--; } }
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); }
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(); } } }
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); }
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(); } }
public virtual void OnCampScoreUpdated(ref SCampScoreUpdateParam prm) { }
public override void OnCampScoreUpdated(ref SCampScoreUpdateParam prm) { this.UpdateCheckResults(); }