コード例 #1
0
    public override bool CheckCondition(TriggerInfo triggerInfo, TriggerCondInfo condInfo)
    {
        CharacterInfo charInfo = triggerInfo.charInfo;
        float         animTime = charInfo.attackTime;

        //float animTime = AnimationCache.getInstance().getAnimation(charInfo.charName).getMeshAnimation(charInfo.actionName).getAnimTime();
        if (animTime == null)
        {
            Debug.Log("Error:Can not get correct animTime");
            return(false);
        }
        //Debug.Log("EffectTime = " + triggerInfo.EffectTime);
        condInfo.isConditionMatch = triggerInfo.EffectTime >= animTime;
        return(condInfo.isConditionMatch);
    }
コード例 #2
0
    public void LoadDataWithConfig(TriggerConfigData data)
    {
        int index = 0;

        foreach (ConfigData condition in data.conditions)
        {
            index++;
            TriggerCondInfo condInfo = new TriggerCondInfo(index);
            condInfo.triggerInfo = this;
            condInfo.LoadDataWithConfig(condition);
            condInfos.Add(condInfo);
        }
        index = 0;
        foreach (ConfigData effect in data.effects)
        {
            index++;
            TriggerEffectInfo effectInfo = new TriggerEffectInfo(index);
            effectInfo.triggerInfo = this;
            effectInfo.LoadDataWithConfig(effect);
            effectInfos.Add(effectInfo);
        }
    }
コード例 #3
0
ファイル: TriggerCondBase.cs プロジェクト: pixar2016/Assets
 public virtual void ResetCondition(TriggerInfo triggerInfo, TriggerCondInfo condInfo)
 {
     condInfo.isConditionMatch = false;
 }
コード例 #4
0
ファイル: TriggerCondBase.cs プロジェクト: pixar2016/Assets
 public virtual bool CheckCondition(TriggerInfo triggerInfo, TriggerCondInfo condInfo)
 {
     return(true);
 }
コード例 #5
0
ファイル: TriggerCondBase.cs プロジェクト: pixar2016/Assets
 public virtual bool IsLifeOver(TriggerInfo triggerInfo, TriggerCondInfo condInfo)
 {
     //Debug.Log("triggerInfo Id = "+triggerInfo.Id+"IsLifeOver EffectCount = " + triggerInfo.EffectCount + "\n");
     return(triggerInfo.EffectCount > 0);
 }
コード例 #6
0
 public override bool CheckCondition(TriggerInfo triggerInfo, TriggerCondInfo condInfo)
 {
     return(condInfo.isConditionMatch);
 }