View GetExternalIPAddress.cs
This file contains 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 UnityEngine.Networking; | |
public class GetExternalIPAddress : MonoBehaviour { | |
void Start() | |
{ | |
StartCoroutine(GetIPAddress()); |
View FloatingText.cs
This file contains 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
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
This file contains 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
#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
This file contains 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
public void Start() | |
{ | |
if(positions != null) | |
{ | |
_rectTransform = GetComponent<RectTransform>(); | |
_nextDestination = positions[0]; | |
_iterator = 0; | |
} | |
else | |
{ |
View FloatingTextSingle.cs
This file contains 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
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
This file contains 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 ScreenShaker : MonoBehaviour { | |
public float shakeAmount = 10f; | |
private float shakeTime = 0.0f; | |
private Vector3 initialPosition; |
View playfablb.cs
This file contains 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
public void GetTop20Leaderboard() | |
{ | |
isRunning = true; | |
PlayFabClientAPI.GetLeaderboard( | |
new GetLeaderboardRequest() | |
{ | |
MaxResultsCount = 20, | |
StatisticName = "score", | |
StartPosition = 0 | |
}, |
View playfab.cs
This file contains 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 PlayFab; | |
using PlayFab.ClientModels; | |
using UnityEngine; | |
using Facebook.Unity; | |
using LoginResult = PlayFab.ClientModels.LoginResult; | |
using System; | |
public class PlayFabFuncs : MonoBehaviour { |
View gist:a089bab2d6bf5a625bce3206e9998a81
This file contains 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 PlayFab; | |
using PlayFab.ClientModels; | |
using UnityEngine; | |
using Facebook.Unity; | |
using LoginResult = PlayFab.ClientModels.LoginResult; | |
using System; | |
public class PlayFabFuncs : MonoBehaviour { |