// Update is called once per frame #region implemented abstract members of JayObject protected override void CustomEventHandler(CustomEvent evnt) { if (evnt.Contains("Notification", "Select")) { collider.enabled = true; } if (evnt.Contains("Notification") && ((string)evnt ["Notification"]) == "Deselect") { collider.enabled = false; } #endregion }
protected override void CustomEventHandler(CustomEvent evnt) { if (Selected == false && evnt.Contains("Notification", "Target")) { Focused = (((GameObject)evnt ["Target"]) == gameObject); } if (Selected == true && evnt.Contains("Notification", "Target")) { GameObject target = (GameObject)evnt ["Target"]; if (target != null) { CardHolder holder = target.GetComponent <CardHolder> (); if (holder != null) { selectedZone = holder; } } } if (evnt.Contains("Notification", "Select")) { Selected = Focused; collider.enabled = false; } if (evnt.Contains("Notification") && ((string)evnt ["Notification"]) == "Deselect") { if (Selected == true) { Selected = false; if (selectedZone != null) { selectedZone.InsertCard(this); } } else { collider.enabled = true; } } #endregion }