public virtual void CommitDeed(string tag) { if (currentTarget == null) { return; } m_deedReporter.ReportDeed(tag, currentTarget.factionMember); }
private void OnCollisionEnter2D(Collision2D coll) { var otherMember = coll.collider.GetComponentInChildren <FactionMember>(); if (otherMember == null || !aggressive) { return; } if (m_member.GetAffinity(otherMember) < 0) { if (m_deedReporter != null) { m_deedReporter.ReportDeed("attack", otherMember); } if (!string.Equals(otherMember.faction.name, "Farmer")) { Destroy(otherMember.gameObject); HandleTarget(null); m_inRange.RemoveAll(x => x == null); CheckForNewTarget(); } } }