コード例 #1
0
        public override void Update(StatSystem statSystem)
        {
            base.Update(statSystem);

            m_SinceLastDamage += Time.deltaTime;

            if (m_SinceLastDamage > m_DamageSpeed)
            {
                m_SinceLastDamage = 0;

                //Weapon.AttackData data = new Weapon.AttackData(m_Target);

                //data.AddDamage(m_DamageType, m_Damage);

                //statSystem.Damage(data);
            }

            //m_FireInstance.Effect.transform.position = m_Target.transform.position + Vector3.up;
        }
コード例 #2
0
        public override void Update(StatSystem statSystem)
        {
            base.Update(statSystem);

            m_SinceLastDamage += Time.deltaTime;

            if (m_SinceLastDamage > m_DamageSpeed)
            {
                m_SinceLastDamage = 0;

                Weapon.AttackData data = new Weapon.AttackData(m_Target);

                data.AddDamage(m_DamageType, m_Damage);

                statSystem.Damage(data);
            }

            //we do not parent as if the original object is destroy it would destroy the instance
            m_FireInstance.Effect.transform.position = m_Target.transform.position + Vector3.up;
        }
コード例 #3
0
 public virtual void Update(StatSystem statSystem)
 {
     m_Timer -= Time.deltaTime;
 }