コード例 #1
0
ファイル: Wrench.cs プロジェクト: pdxparrot/ggj2020
        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();
                }
            }
        }
コード例 #2
0
ファイル: Wrench.cs プロジェクト: pdxparrot/ggj2020
        public override bool Use()
        {
            if (!base.Use())
            {
                return(false);
            }

            _lastTurnDirection = WrenchDirection.Right;
            HoldingPlayer.ToolBubble.ShowThumbLeft();

            return(true);
        }