protected override void Update() { base.Update(); HasGaze = GameObjectInteractor.HasGaze(); if (_hasGaze != HasGaze) { _hasGaze = HasGaze; if (HasGaze) { if (debug) { Debug.Log(this.gameObject.name + ": PlayMakerGazeAwareComponent : " + GlazeStartedEvent + " " + eventTarget); } GlazeStartedEvent.SendEvent(null, eventTarget); } else { if (debug) { Debug.Log(this.gameObject.name + ": PlayMakerGazeAwareComponent : " + GlazeEndedEvent + " " + eventTarget); } GlazeEndedEvent.SendEvent(null, eventTarget); } } }
protected override void Update() { base.Update(); IsActivated = GameObjectInteractor.IsActivated(); var activationFocusState = GameObjectInteractor.GetActivationFocusState(); HasActivationFocus = (activationFocusState == ActivationFocusState.HasActivationFocus); HasTentativeActivationFocus = (activationFocusState == ActivationFocusState.HasTentativeActivationFocus); }
protected override void Update() { base.Update(); if (GameObjectInteractor.HasGaze() || isMouseOver) { time += Time.deltaTime; this.currentHealth -= 100f * Time.deltaTime; } if (currentHealth <= 0) { Destroy(this.gameObject); Instantiate(Explosion, this.transform.position, Quaternion.identity); } this.astRenderer.color = Color.Lerp(EndColor, startingColor, currentHealth / startingHealth); isMouseOver = false; }
protected override void Update() { base.Update(); Velocity = GameObjectInteractor.GetPanVelocity(); }
protected override void Update() { base.Update(); HasGaze = GameObjectInteractor.HasGaze(); }