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
| # Definitions | |
| // An 'Actor' number is the photonView's digit that specifies a PhotonPlayer (1, 5, 17) | |
| // A 'Player' number is the number of the player dependent on the order of entry to the game (Player 1, 2, 3, etc.) | |
| // A 'Turn' is the target Player number whose turn it is currently to throw (Player number X) | |
| public int myPlayerNumber; | |
| public DGPlayer[] DGPlayers; | |
| [System.Serializable] | |
| public class DGPlayer | |
| { |
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
| # Variable Initialization | |
| private const string savesFolderName = "Saves"; | |
| private const string saveFileName_CareerStats = "DiscBenders_AceRun_CareerStats.save"; | |
| private const string saveFilePath_End_CareerStats = savesFolderName + "/" + saveFileName_CareerStats; | |
| private static string saveFilePath_Full_CareerStats; | |
| private const string saveFileName_Progression = "DiscBenders_AceRun_ProgressionData.save"; | |
| private const string saveFilePath_End_Progression = savesFolderName + "/" + saveFileName_Progression; | |
| private static string saveFilePath_Full_Progression; |
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
| # Initializing pre-defined Layers | |
| public static LayerMask terrainLayerMask = LayerMask.GetMask("Terrain"); | |
| public static LayerMask groundLayerMask = terrainLayerMask | LayerMask.GetMask("TransparentFX", "LandingSpecial"); | |
| public static LayerMask groundWaterLayerMask = groundLayerMask | LayerMask.GetMask("Water"); | |
| public static LayerMask treeLayerMask = LayerMask.GetMask("Tree"); | |
| # Point Methods | |
| public static Vector3 NearestGroundWaterPointVertically(Vector3 target, float rayDist = 5, float heightOffset = defaultVerticalRayPosOffset) | |
| { | |
| return NearestPointVertically(target, groundWaterLayerMask, QueryTriggerInteraction.Collide, rayDist, heightOffset); |
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
| // Called when player releases disc for a throw | |
| public void RegressionDirection(GameObject throwingContGO, out ControllerFrame interpolatedControllerFrame, out Vector3 throwRegressionDirection, out Vector3 controllerAngularVelocity, out float contSpinSpeed) | |
| { | |
| InteractGrab_Pressure pressureGrabber = throwingContGO.GetComponent<InteractGrab_Pressure>(); | |
| bool isBackHand = pressureGrabber.grabButtonModifier.CurrentIsBackhand(); | |
| interpolatedControllerFrame = InterpolateControllerFrame(pressureGrabber, ref debugThrowLog); | |
| Vector3 interpPosIG = interpolatedControllerFrame.position; | |
| // Change last velHistory to interpolated controller velocity |
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
| // Runs on every update on the physics loop | |
| void FixedUpdate() | |
| { | |
| if (isSimulating) | |
| { | |
| if (myState != State.Idle) | |
| { | |
| _velocity = body.velocity; | |
| // Apply gravity & custom drags |
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
| // Thrown disc stopped on ground | |
| void CurrentDiscStopped(FrisbeeDisc disc, float throwDistance, bool discInBasket, bool isTapIn = false) | |
| { | |
| if (gameOver || !gameStarted || (isMultiplayer && !MultiplayerServicer.instance.IsActorTurn(disc.pView.OwnerActorNr)) || nextHoleRoutine.IsRunning) return; | |
| currentDisc.ActivateMeshInteractionCollision(); | |
| checkDiscThrownMinDistance = false; | |
| wasTappedIn = isTapIn; | |
| // Thrower was outside throwing boundaries |
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 System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class PitchZone : MonoBehaviour { | |
| public static PitchZone instance; | |
| public Transform batZone; | |
| Transform pitchAngler; |
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 System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class PitchAnimator : MonoBehaviour { | |
| public enum Pitch { Fastball, Curveball, Slider, Screwgie }; | |
| Pitch currentPitch; | |
| Quaternion currentRotation; | |
| float zoneX = 1.5f; |
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 System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using System.Linq; | |
| using UnityEditor; | |
| using System; | |
| using System.IO; | |
| using UnityEngine.UI; | |
| public class BoardMaster : MonoBehaviour { |
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
| class RouteManager : MonoBehaviour | |
| { | |
| public static RouteManager instance; | |
| [Range(0.1f, 15f)] | |
| public float timeScale = 1; | |
| public float referenceDistance; | |
| [Header("Cruise Climb Angles")] | |
| public int cruiseClimbAngleMin = 20; |
NewerOlder