示例#1
0
 protected void OnConditionChanged(IStarCondition InCondition)
 {
     DebugHelper.Assert(InCondition != null);
     if (this.OnChanged != null)
     {
         this.OnChanged(this, InCondition);
     }
 }
示例#2
0
 private void OnStarSystemChanged(IStarEvaluation InStarEvaluation, IStarCondition InStarCondition)
 {
     if ((Singleton <StarSystem> .instance.winEvaluation == InStarEvaluation) && Singleton <StarSystem> .instance.isFirstStarCompleted)
     {
         PoolObjHandle <ActorRoot> handle;
         PoolObjHandle <ActorRoot> handle2;
         InStarCondition.GetActorRef(out handle, out handle2);
         Singleton <BattleLogic> .instance.OnWinning(handle, handle2);
     }
 }
示例#3
0
 private void OnFailureEvaluationChanged(IStarEvaluation InStarEvaluation, IStarCondition InStarCondition)
 {
     if ((Singleton <StarSystem> .instance.failureEvaluation == InStarEvaluation) && Singleton <StarSystem> .instance.isFailure)
     {
         PoolObjHandle <ActorRoot> handle;
         PoolObjHandle <ActorRoot> handle2;
         InStarCondition.GetActorRef(out handle, out handle2);
         Singleton <BattleLogic> .instance.OnFailure(handle, handle2);
     }
 }
示例#4
0
        public override void Initialize(ResDT_ConditionInfo InConditionInfo)
        {
            base.Initialize(InConditionInfo);
            this.ContextProxy = this.CreateStarCondition();
            StarCondition starCondition = this.ContextProxy as StarCondition;

            if (starCondition != null)
            {
                starCondition.OnStarConditionChanged += new OnStarConditionChangedDelegate(this.OnProxyChanged);
            }
        }
示例#5
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);
         }
     }
 }
示例#6
0
 public virtual void OnActorDeath(ref DefaultGameEventParam prm)
 {
     for (int i = this.Conditions.Count - 1; (i >= 0) && (i < this.Conditions.Count); i--)
     {
         IStarCondition condition = this.Conditions[i];
         if (condition != null)
         {
             condition.OnActorDeath(ref prm);
         }
     }
 }
示例#7
0
        public override IStarCondition CreateStarCondition()
        {
            IStarCondition condition = Factory.Create(this.attrID) as IStarCondition;

            object[] inParameters = new object[] { this.attrID };
            DebugHelper.Assert(condition != null, "can't create Attr id {0}", inParameters);
            if (condition != null)
            {
                condition.Initialize(base.ConditionInfo);
            }
            return(condition);
        }
示例#8
0
 private void OnEvaluationChangedInner(IStarEvaluation InStarEvaluation, IStarCondition InStarCondition)
 {
     if (InStarEvaluation == this.FailureEvaluation)
     {
         if (this.OnFailureEvaluationChanged != null)
         {
             this.OnFailureEvaluationChanged(InStarEvaluation, InStarCondition);
         }
     }
     else if (this.OnEvaluationChanged != null)
     {
         this.OnEvaluationChanged(InStarEvaluation, InStarCondition);
     }
 }
示例#9
0
        public override IStarCondition CreateStarCondition()
        {
            IStarCondition starCondition = StarConditionAttr.Factory.Create(this.attrID) as IStarCondition;

            DebugHelper.Assert(starCondition != null, "can't create Attr id {0}", new object[]
            {
                this.attrID
            });
            if (starCondition != null)
            {
                starCondition.Initialize(base.ConditionInfo);
            }
            return(starCondition);
        }
示例#10
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--;
            }
        }
示例#11
0
        public virtual void OnActorDeath(ref GameDeadEventParam 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.OnActorDeath(ref prm);
                }
                num--;
            }
        }
示例#12
0
        public IStarCondition GetConditionAt(int Index)
        {
            IStarCondition arg_2C_0;

            if (Index >= 0 && Index < this.Conditions.get_Count())
            {
                IStarCondition starCondition = this.Conditions.get_Item(Index);
                arg_2C_0 = starCondition;
            }
            else
            {
                arg_2C_0 = null;
            }
            return(arg_2C_0);
        }
示例#13
0
        public IStarCondition GetConditionAt(int Index)
        {
            IStarCondition result;

            if (Index >= 0 && Index < this.Conditions.Count)
            {
                IStarCondition starCondition = this.Conditions[Index];
                result = starCondition;
            }
            else
            {
                result = null;
            }
            return(result);
        }
示例#14
0
        public void OnEvaluationChange(IStarEvaluation InStarEvaluation, IStarCondition InStarCondition)
        {
            if (this.conditionTexts[InStarEvaluation.index] != null)
            {
                this.conditionTexts[InStarEvaluation.index].text = InStarEvaluation.description;
            }
            Transform transform = this.m_Obj.transform.Find("TaskPanel").transform;

            if (transform != null)
            {
                if (InStarEvaluation.isSuccess)
                {
                    transform.Find(string.Format("Condition{0}", InStarEvaluation.index + 1)).GetComponent <Text>().color = Color.green;
                }
                else
                {
                    transform.Find(string.Format("Condition{0}", InStarEvaluation.index + 1)).GetComponent <Text>().color = Color.white;
                }
            }
        }
示例#15
0
 private void OnProxyChanged(IStarCondition InStarCondition)
 {
     DebugHelper.Assert(InStarCondition == this.ContextProxy);
     this.TriggerChangedEvent();
 }