예제 #1
0
        public override void Apply(CAIController from, CAIController to)
        {
            //Debug.Log("buff apply to target");
            base.Apply(from, to);

            //不是己方给与的效果, 那么我们就人物是伤害了
            //TODO 可能有坑
            if (m_owner != null && !m_owner.SameTeam(m_from))
            {
                m_owner.Pawn.Instigator = m_from;
            }

            if (MBuffMeta.Duration > 0)
            {
                m_durationReg = new CTimeRegulator(MBuffMeta.Duration);
                //Debug.Log("create duration time is " + m_meta.Duration);
            }

            if (MBuffMeta.Period > 0)
            {
                m_dotReg = new CTimeRegulator(MBuffMeta.Period);
                OnPeriod();
            }

            ApplyModification();
            ApplyState();
        }
예제 #2
0
 public CProcedureBase(string name) : base(name)
 {
     m_loadingTimeReg = new CTimeRegulator(m_maxLoadingSecond, 1);
 }
예제 #3
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     m_durationReg = null;
     m_dotReg      = null;
 }
예제 #4
0
 public CAISense_Sight() : base()
 {
     m_regulator = new CTimeRegulator(0.1f);
 }