// Use this for initialization void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this.gameObject); } else { Destroy(gameObject); } }
public static void Update(this BallTouch touch, Touch partial) { touch.Team = partial.Team; touch.PlayerName = partial.PlayerName; touch.GameSeconds = partial.GameSeconds; if (partial.Location.HasValue) { touch.Location = partial.Location.Value.ToNumerics(); } if (partial.Normal.HasValue) { touch.Direction = partial.Normal.Value.ToNumerics(); } }