// Update is called once per frame void Update() { if (isStaying) { timeLeft -= Time.deltaTime; } else { if (Mathf.Abs(transform.position.x - location.x) < 0.01f) { transform.position = location; if (isMovingOut) { gameObject.SetActive(false); IsOut?.Invoke(); return; } } else { transform.position = Vector3.Lerp(transform.position, location, speed * Time.deltaTime); } } }
private void Update() { if (_isStaying) { _timeLeft -= Time.deltaTime; if (_timeLeft <= 0) { MoveOut(); } } else { if (Mathf.Abs(transform.position.x - Location.x) < 0.01f) { transform.position = Location; if (_isMovingIn) { Stay(); } if (_isMovingOut) { gameObject.SetActive(false); IsOut?.Invoke(); return; } } else { transform.position = Vector3.Lerp(transform.position, Location, Speed * Time.deltaTime); } } }
///<inheritdoc/> public override int GetHashCode() { unchecked { var hashCode = Path.GetHashCode(); hashCode = (hashCode * 397) ^ ParameterType.GetHashCode(); hashCode = (hashCode * 397) ^ IsOut.GetHashCode(); hashCode = (hashCode * 397) ^ IsOptional.GetHashCode(); return(hashCode); } }
/// <inheritdoc/> public override int GetHashCode() { unchecked { var hashCode = Name.GetHashCode(); hashCode = (hashCode * 397) ^ IndirectionLevel; hashCode = (hashCode * 397) ^ ArrayDimensions; hashCode = (hashCode * 397) ^ IsByRef.GetHashCode(); hashCode = (hashCode * 397) ^ IsOut.GetHashCode(); return(hashCode); } }
private void Update() { _timeLeft -= Time.deltaTime; if (_timeLeft <= 0) { gameObject.SetActive(false); IsOut?.Invoke(); return; } transform.position = Vector3.Lerp(transform.position, transform.position + Vector3.up * 0.2f, Time.deltaTime * 1.5f); }
/// <summary> /// Initializes a new instance of the <see cref="PlayerBoxScore" /> class. /// </summary> /// <param name="dict">The dictionary containing the player box score.</param> /// <param name="playerID">The player ID.</param> /// <param name="teamID">The team.</param> /// <param name="playerName">The player's name.</param> public PlayerBoxScore(Dictionary <string, string> dict, int playerID, int teamID, string playerName = "") { PlayerID = playerID; Name = playerName; TeamID = teamID; IsStarter = IsStarter.TrySetValue(dict, "Starter", typeof(bool)); PlayedInjured = PlayedInjured.TrySetValue(dict, "Injured", typeof(bool)); IsOut = IsOut.TrySetValue(dict, "DNP", typeof(bool)); MINS = MINS.TrySetValue(dict, "MINS", typeof(UInt16)); PTS = PTS.TrySetValue(dict, "PTS", typeof(UInt16)); REB = REB.TrySetValue(dict, "REB", typeof(UInt16)); AST = AST.TrySetValue(dict, "AST", typeof(UInt16)); STL = STL.TrySetValue(dict, "STL", typeof(UInt16)); BLK = BLK.TrySetValue(dict, "BLK", typeof(UInt16)); TOS = TOS.TrySetValue(dict, "TO", typeof(UInt16)); FGM = FGM.TrySetValue(dict, "FGM", typeof(UInt16)); FGA = FGA.TrySetValue(dict, "FGA", typeof(UInt16)); TPM = TPM.TrySetValue(dict, "3PM", typeof(UInt16)); TPA = TPA.TrySetValue(dict, "3PA", typeof(UInt16)); FTM = FTM.TrySetValue(dict, "FTM", typeof(UInt16)); FTA = FTA.TrySetValue(dict, "FTA", typeof(UInt16)); OREB = OREB.TrySetValue(dict, "OREB", typeof(UInt16)); FOUL = FOUL.TrySetValue(dict, "FOUL", typeof(UInt16)); }