This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public class JumpingCharacterControllerExample : MonoBehaviour | |
| { | |
| [SerializeField] private float jumpHeight; | |
| [SerializeField] private float timeToReachJumpApex; | |
| private Vector3 _velocity; | |
| private Vector3 _oldVelocity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # getting an integer | |
| def getIntegerInput(prompt: str, lowerBound: int = None, upperBound: int = None) -> int: | |
| while True: | |
| userInput = input(prompt) | |
| try: | |
| userInput = int(userInput) | |
| if lowerBound and userInput < lowerBound: | |
| print(f"Input must be greater than or equal to {str(lowerBound)}") | |
| elif upperBound and userInput > upperBound: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import List, Tuple, Mapping, Set | |
| from collections import defaultdict | |
| Graph = Mapping[str, Set[str]] | |
| Connection = Tuple[str, str] | |
| def createGraph(connections: List[Connection]) -> Graph: | |
| graph: Graph = defaultdict(set) | |
| for a, b in connections: |
OlderNewer