예제 #1
0
 public override void OnHit(HitInfo hi, GameObject attacker)
 {
     if (!GetComponent <PropertyHolder> ().HasProperty("Flaming"))
     {
         //Debug.Log ("Does not have flaming");
         if (hi.HasElement(ElementType.FIRE))
         {
             //Debug.Log ("has flaming");
             HitboxDoT hd = hi.mHitbox as HitboxDoT;
             if (hd != null)
             {
                 m_flameDamage += (Time.deltaTime * hi.Damage);
             }
             else
             {
                 m_flameDamage += hi.Damage;
             }
             if (m_flameDamage >= FLAME_THREASHOLD)
             {
                 GetComponent <PropertyHolder> ().AddProperty("PR_Flaming");
                 m_flameDamage = 0f;
             }
         }
     }
 }
예제 #2
0
 public override void OnHit(HitInfo hi, GameObject attacker)
 {
     if (hi.HasElement(ElementType.FIRE))
     {
         GetComponent <Fighter> ().TryAttack("fire");
     }
 }
예제 #3
0
 public override void OnHit(HitInfo hi, GameObject attacker)
 {
     if (hi.HasElement(ElementType.LIGHTNING))
     {
         m_activeTime = 3f;
     }
 }
예제 #4
0
 public override void OnHit(HitInfo hi, GameObject attacker)
 {
     if (hi.HasElement(ElementType.PSYCHIC) &&
         attacker.GetComponent <PropertyHolder> () != null &&
         attacker.GetComponent <PropertyHolder> ().HasProperty(this))
     {
         PR_SentimentTarget a = attacker.GetComponent <PR_SentimentTarget>();
         if (a.CurrentSentiment > 0)
         {
             ChangeSentiment(1);
             Instantiate(FXHit.Instance.FXSentiment, transform.position, Quaternion.identity);
         }
     }
 }