Skip to content

Instantly share code, notes, and snippets.

Raziel619

Block or report user

Report or block Raziel619

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Raziel619
Raziel619 / GetExternalIPAddress.cs
Created Sep 16, 2019
Unity Function for getting External IP Address
View GetExternalIPAddress.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class GetExternalIPAddress : MonoBehaviour {
void Start()
{
StartCoroutine(GetIPAddress());
@Raziel619
Raziel619 / FloatingText.cs
Created Sep 14, 2019
Functions in FloatingText.cs - Medium Post
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))
{
@Raziel619
Raziel619 / FloatingText.cs
Created Sep 14, 2019
Global Variables in FloatingText.cs
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>();
@Raziel619
Raziel619 / FloatingTextSingle.cs
Created Sep 14, 2019
Functions in FloatingTextSingle.cs - Medium Post
View FloatingTextSingle.cs
public void Start()
{
if(positions != null)
{
_rectTransform = GetComponent<RectTransform>();
_nextDestination = positions[0];
_iterator = 0;
}
else
{
@Raziel619
Raziel619 / FloatingTextSingle.cs
Created Sep 14, 2019
Global Variables in FloatingTextSingle.cs
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;
@Raziel619
Raziel619 / ScreenShaker.cs
Created Sep 14, 2019
Unity sample screenshaker for canvas
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;
@Raziel619
Raziel619 / playfablb.cs
Created Sep 14, 2019
Playfab GetTop20Leaderboard Function
View playfablb.cs
public void GetTop20Leaderboard()
{
isRunning = true;
PlayFabClientAPI.GetLeaderboard(
new GetLeaderboardRequest()
{
MaxResultsCount = 20,
StatisticName = "score",
StartPosition = 0
},
@Raziel619
Raziel619 / playfab.cs
Last active Sep 14, 2019
Gist for 'Playfab First Impression' Medium post
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 {
@Raziel619
Raziel619 / gist:a089bab2d6bf5a625bce3206e9998a81
Created Sep 14, 2019
Gist for 'Playfab First Impression' Medium post
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 {
You can’t perform that action at this time.