Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     //PLayer only Update
     //Player player = mSkillRunner as Player;
     //if(null != player)
     //{
     //    mPropertys[(int)LifeFormProperty.LFP_Stamina] = player.GetAttribute(Pathea.AttribType.Comfort);
     //    mPropertys[(int)LifeFormProperty.LFP_Oxygen] = player.GetAttribute(Pathea.AttribType.Oxygen);
     //    FoodCheckInterval -= Time.deltaTime;
     //    if(FoodCheckInterval < 0)
     //    {
     //        FoodCheckInterval = 1f;
     //        int Count = 0;
     //        foreach(int property in mPropertys.Keys)
     //        {
     //            if((LifeFormProperty)property >= LifeFormProperty.LFP_Food_Min
     //                && (LifeFormProperty)property <= LifeFormProperty.LFP_Food_Max
     //                && mPropertys[property] > 0)
     //            {
     //                Count++;
     //            }
     //        }
     //        if(Count > 0 && !mSkillRunner.IsEffRunning(10020 + Count))
     //            mSkillRunner.RunEff(10020 + Count, mSkillRunner);
     //    }
     //}
     //CheckRules
     foreach (int index in mIndexList)
     {
         mRulesDecreaseStackCount[index] -= Time.deltaTime;
         if (mRulesDecreaseStackCount[index] < 0)
         {
             LifeFormRule rule = LifeFormRule.GetRule(index);
             mRulesDecreaseStackCount[index] = rule.mUpdateInterval;
             if ((rule.mConditionType == 0 && mPropertys[rule.mPropertyType] >= rule.mConditionMin && mPropertys[rule.mPropertyType] <= rule.mConditionMax) ||
                 (rule.mConditionType == 1 && mPropertys[rule.mPropertyType] / mPropertyMaxs[rule.mPropertyType] >= rule.mConditionMin &&
                  mPropertys[rule.mPropertyType] / mPropertyMaxs[rule.mPropertyType] <= rule.mConditionMax))
             {
                 mSkillRunner.RunEff(rule.mCostSkillID, mSkillRunner);
             }
         }
     }
 }
Ejemplo n.º 2
0
 protected virtual EffSkillInstance CostSkill(SkillRunner coster, int id, ISkillTarget target)
 {
     return(coster.RunEff(id, target));
 }