Beispiel #1
0
 private void DetachAttachUI()
 {
     detachAttach.Activated();
     attachmentHandsUI.enabled = !attachmentHandsUI.enabled;
     SetMaterial(dettachAttachMat);
     StartCoroutine(DelayIdleColour(detachAttach.IdleColorAfterActivationDelay, tipAction));
     HandleConnection();
     tipAction = null;
 }
Beispiel #2
0
 private void OnTriggerExit(Collider other)
 {
     tipAction = other.gameObject.GetComponent <TipAction>();
     if (tipAction != null)
     {
         SetMaterial(idleMat);
         tipAction = null;
     }
 }
Beispiel #3
0
            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;
            }
Beispiel #4
0
 private void OnTriggerEnter(Collider other)
 {
     if (detachAttach.IsActive)
     {
         tipAction = other.gameObject.GetComponent <TipAction>();
         if (tipAction != null)
         {
             timetriggerstay = 0;
         }
     }
 }
Beispiel #5
0
 private void SetMaterial(Material material, TipAction tipAction)
 {
     tipAction.SetMaterial(material);
     gameObjectRenderer.material = material;
 }
Beispiel #6
0
    private IEnumerator DelayIdleColour(float time, TipAction tipAction)
    {
        yield return(new WaitForSeconds(time));

        SetMaterial(idleMat, tipAction);
    }
Beispiel #7
0
 public void HideTip()
 {
     NextAction       = TipAction.Hide;
     MyTimer.Interval = HideDelay / 3;
     MyTimer.Enabled  = true;
 }