private void OnTriggerEnter(Collider other) { Tapestry_Actor actor = other.gameObject.GetComponentInParent <Tapestry_Actor>(); if (!ReferenceEquals(actor, null)) { actor.AddEffect(effectStanding); } }
private void OnTriggerEnter(Collider other) { if (ReferenceEquals(keywords, null)) { keywords = (Tapestry_KeywordRegistry)ScriptableObject.CreateInstance("Tapestry_KeywordRegistry"); } Tapestry_Actor a = other.GetComponentInParent <Tapestry_Actor>(); if (keywords.Count == 0) { if (a != null) { a.AddEffect(effect.Clone()); } } else if (applyByKeyword) { if (a != null && !ReferenceEquals(a.keywords, null)) { if (a.keywords.ContainsOne(keywords)) { a.AddEffect(effect.Clone()); } } } else { if (a != null && !ReferenceEquals(a.keywords, null)) { if (!a.keywords.ContainsAll(keywords)) { a.AddEffect(effect.Clone()); } } } }