View GetExternalIPAddress.cs
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
public class GetExternalIPAddress : MonoBehaviour { | |
void Start() | |
{ | |
StartCoroutine(GetIPAddress()); |
View FloatingText.cs
public void RunMessage(string msg, Color color) | |
{ | |
if((msg == string.Empty) || (msg == null)) | |
{ | |
return; | |
} | |
_queue.Enqueue(new MessageWithColor(msg, color)); | |
if((_queue.Count == 1) && (!_isDequeuing)) | |
{ | |
View FloatingText.cs
#region Public Objects to be set in editor | |
public GameObject slideMsg; | |
#endregion | |
public static FloatingText Instance { get; private set; } | |
private bool _isDequeuing = false; | |
private Queue<MessageWithColor> _queue = new Queue<MessageWithColor>(); |
View FloatingTextSingle.cs
public void Start() | |
{ | |
if(positions != null) | |
{ | |
_rectTransform = GetComponent<RectTransform>(); | |
_nextDestination = positions[0]; | |
_iterator = 0; | |
} | |
else | |
{ |
View FloatingTextSingle.cs
public Text mainText; | |
public Image mainColor; | |
public Vector2[] positions; | |
public float movSpeed; | |
public float pauseTime; | |
private RectTransform _rectTransform; | |
private Vector2 _nextDestination; | |
private int _iterator; | |
private bool _paused = false; |
View ScreenShaker.cs
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ScreenShaker : MonoBehaviour { | |
public float shakeAmount = 10f; | |
private float shakeTime = 0.0f; | |
private Vector3 initialPosition; |
View playfablb.cs
public void GetTop20Leaderboard() | |
{ | |
isRunning = true; | |
PlayFabClientAPI.GetLeaderboard( | |
new GetLeaderboardRequest() | |
{ | |
MaxResultsCount = 20, | |
StatisticName = "score", | |
StartPosition = 0 | |
}, |
View playfab.cs
using System.Collections; | |
using System.Collections.Generic; | |
using PlayFab; | |
using PlayFab.ClientModels; | |
using UnityEngine; | |
using Facebook.Unity; | |
using LoginResult = PlayFab.ClientModels.LoginResult; | |
using System; | |
public class PlayFabFuncs : MonoBehaviour { |
View gist:a089bab2d6bf5a625bce3206e9998a81
using System.Collections; | |
using System.Collections.Generic; | |
using PlayFab; | |
using PlayFab.ClientModels; | |
using UnityEngine; | |
using Facebook.Unity; | |
using LoginResult = PlayFab.ClientModels.LoginResult; | |
using System; | |
public class PlayFabFuncs : MonoBehaviour { |