private void OnTouch(Contactable contact) { if (contact == Target) { SetTarget(null); } }
public void MoveTo(Contactable contact) { if (contact != null && Target != contact && Vector3.Distance(transform.position, contact.transform.position) > boundaryRadius + contact.ContactRadius) { SetTarget(contact); } }
private void RemoveContact(Contactable contact) { Contacts.Remove(contact); if (RadarContactEvent != null) { RadarContactEvent(this, new RadarContactArgs(contact, true)); } }
private void AddContact(Contactable contact) { Contacts.Add(contact); if (RadarContactEvent != null) { RadarContactEvent(this, new RadarContactArgs(contact, false)); } }
private void SetTarget(Contactable contact) { if (Target != contact) { Target = contact; if (TargetChanged != null) { TargetChanged(this, EventArgs.Empty); } } }
private void OnExit(Contactable contact) { var res = contact as Resource; if (res != null) { AvailableTargets.Remove(res); if (res == Target) { SetTarget(); } } }
private void OnEnter(Contactable contact) { var res = contact as Resource; if (res != null) { AvailableTargets.Add(res); if (Target == null) { SetTarget(); } } }
internal static HandleRef getCPtr(Contactable obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Contactable obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public RadarContactArgs(Contactable contact, bool removed) { Contact = contact; ContactRemoved = removed; }