public override void TrackThumbStickAxis(Vector2 axis) { if (axis.x >= _turnAxisAmount && _lastTurnDirection == WrenchDirection.Left) { _lastTurnDirection = WrenchDirection.Right; HoldingPlayer.ToolBubble.ShowThumbLeft(); _turnEffectTrigger.Trigger(); } else if (axis.x <= -_turnAxisAmount && _lastTurnDirection == WrenchDirection.Right) { _lastTurnDirection = WrenchDirection.Left; HoldingPlayer.ToolBubble.ShowThumbRight(); _turnEffectTrigger.Trigger(); _successfulTurns++; } if (_successfulTurns >= GameManager.Instance.GameGameData.WrenchSuccessfulTurns) { if (!RepairPoint.IsRepaired) { RepairPoint.Repair(); } } }
protected override void Awake() { base.Awake(); _holdTimer = TimeManager.Instance.AddTimer(); _holdTimer.TimesUpEvent += (sender, args) => { if (!RepairPoint.IsRepaired) { RepairPoint.Repair(); } }; }
protected override void OnUseToolEffectEnd() { base.OnUseToolEffectEnd(); base.EndUse(); HoldingPlayer.ToolBubble.ShowUnpressedButton(); _succesfulHits++; if (_succesfulHits < GameManager.Instance.GameGameData.HammerSuccessfulHits) { return; } if (!RepairPoint.IsRepaired) { RepairPoint.Repair(); } }