This file contains hidden or 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
// Upgrade NOTE: replaced '_Object2World' with 'unity_ObjectToWorld' | |
Shader "Custom/FogShader" | |
{ | |
Properties | |
{ | |
_MainTex("Fog texture", 2D) = "white" {} | |
_MainTex2("Fog texture 2", 2D) = "white" {} | |
_FogColorFactor("Fog color factor", Float) = 1 | |
_FogScroll("Fog scroll speed", vector) = (0,0,0,0) |
This file contains hidden or 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 UnityEngine; | |
namespace Assets.Utils | |
{ | |
public class LogsMonitor : MonoBehaviour | |
{ | |
public string BaseUrl = "https://docs.google.com/forms/d/11111111111111__QIK5YZFhI8R_3e91Zgcy9ULlcPYc/formResponse"; | |
public string VersionField = "entry.1111111111"; | |
public string PlayerNameField = "entry.111111111"; |
This file contains hidden or 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
[MenuItem("Custom tools/import icons")] | |
public static void ImportIcons() | |
{ | |
var rootPath = Path.Combine(Application.dataPath, "Resources/text_icons/"); | |
var icons = Directory.GetFiles(rootPath, "*.png", SearchOption.AllDirectories); | |
if (icons.Length == 0) | |
{ | |
UnityEngine.Debug.Log("Failed to find icons"); | |
return; | |
} |
This file contains hidden or 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
namespace Assets.Scripts.Domain.Systems | |
{ | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
public class ActionsQueue : MonoBehaviour | |
{ | |
protected static ActionsQueue _instance; |
This file contains hidden or 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
private float FindPercentage(float input, float min, float max) | |
{ | |
return ((input - min)) / (max - min); | |
} |
This file contains hidden or 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 UnityEngine; | |
using System.Collections.Generic; | |
using System; | |
using System.Linq; | |
namespace Assets.Scripts.Domain.Localization | |
{ | |
[CreateAssetMenu(fileName = "Localization", menuName = "Data/Localization")] | |
public class LocalizationItem : ScriptableObject | |
{ |
This file contains hidden or 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 UnityEngine; | |
using UnityEngine.UI; | |
namespace Prototype.Scripts.Utils | |
{ | |
public static class ScrollRectExtension | |
{ | |
public static void SnapToChild(this ScrollRect scrollRect, RectTransform child) | |
{ | |
scrollRect.content.localPosition = GetContentLocalPositionForChild(scrollRect, child); |
This file contains hidden or 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
namespace Assets.Scripts.Tools | |
{ | |
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
[System.Serializable] | |
public class ShuffleBag<T> : IList<T> | |
{ | |
[SerializeField] private List<T> data = new(); |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
namespace Prototype.Scripts.Contexts.Common | |
{ | |
public interface IObserver<T, Tenum> where Tenum : struct, IConvertible | |
{ | |
void OnContextChanged(T context, Tenum property); | |
void OnAttached(T context); | |
void OnDetached(); |
This file contains hidden or 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
private Bounds OrthographicBounds(float orthographicSize) | |
{ | |
float screenAspect = (float)Screen.width / (float)Screen.height; | |
float cameraHeight = orthographicSize * 2; | |
Bounds bounds = new Bounds( | |
transform.position, | |
new Vector3(cameraHeight * screenAspect, cameraHeight, 0)); | |
return bounds; |