private void DetachAttachUI() { detachAttach.Activated(); attachmentHandsUI.enabled = !attachmentHandsUI.enabled; SetMaterial(dettachAttachMat); StartCoroutine(DelayIdleColour(detachAttach.IdleColorAfterActivationDelay, tipAction)); HandleConnection(); tipAction = null; }
private void OnTriggerExit(Collider other) { tipAction = other.gameObject.GetComponent <TipAction>(); if (tipAction != null) { SetMaterial(idleMat); tipAction = null; } }
public void ShowTip(string text, int x, int y) { Text = text; TipX = x; TipY = y; NextAction = TipAction.Show; MyTimer.Interval = InitialDelay / 3; MyTimer.Enabled = true; }
private void OnTriggerEnter(Collider other) { if (detachAttach.IsActive) { tipAction = other.gameObject.GetComponent <TipAction>(); if (tipAction != null) { timetriggerstay = 0; } } }
private void SetMaterial(Material material, TipAction tipAction) { tipAction.SetMaterial(material); gameObjectRenderer.material = material; }
private IEnumerator DelayIdleColour(float time, TipAction tipAction) { yield return(new WaitForSeconds(time)); SetMaterial(idleMat, tipAction); }
public void HideTip() { NextAction = TipAction.Hide; MyTimer.Interval = HideDelay / 3; MyTimer.Enabled = true; }