Ejemplo n.º 1
0
 void Update()
 {
     // Scale the TimerRing down over time
     if (tParam < 1)
     {
         tParam                        += Time.deltaTime / _lifetime;//* decaySpeed; //This will increment tParam based on Time.deltaTime multiplied by a speed multiplier
         timerRingScale                 = Mathf.Lerp(3f, 1f, tParam);
         timerRenderer.color            = Color.Lerp(red, green, tParam);
         TimerRing.transform.localScale = new Vector3(timerRingScale, timerRingScale, 1f);
     }
     else if (aligned == false)
     {
         alignTime = Time.time;
         aligned   = true;
     }
     else if (aligned && Time.time >= alignTime + delayTime)
     {
         //CombatController.Instance.TargetOutcome(this, false);
         TapTargetEventManager.TapTargetCall(transform.position, Accuracy(false));
     }
 }
Ejemplo n.º 2
0
 //Detect if a click occurs
 public void OnPointerClick(PointerEventData pointerEventData)
 {
     //Output to console the clicked GameObject's name and the following message. You can replace this with your own actions for when clicking the GameObject.
     Debug.Log(name + " Game Object Clicked!");
     TapTargetEventManager.TapTargetCall(transform.position, Accuracy(true));
 }