Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄

Diego Santos Seabra Dssdiego

🦄
View GitHub Profile
View gist:1cfd823038f02ef9dda53108c1ebade7
#### ABERTOS ####
#EXTINF:0 tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/TV_Senado.svg/1200px-TV_Senado.svg.png" group-title="ABERTOS", TV Senado
http://www.tvmpf.mpf.mp.br:1935/event455/event455.stream_720p/playlist.m3u8
#EXTINF:0 tvg-logo="https://upload.wikimedia.org/wikipedia/pt/2/22/Logotipo_da_Rede_Globo.png" group-title="ABERTOS", GLOBO MINAS
http://cdn.poptv.vip:80/daniel/daniel/7877
#### VARIEDADES ####
@Dssdiego
Dssdiego / _tcc.csv
Last active Jul 7, 2020
CSV's utilizados no meu TCC. Disponível em https://tcc-dseabra.herokuapp.com
View _tcc.csv
Type Author Teacher
TCC Diego S. Seabra Josiane C. V. Rezende
@Dssdiego
Dssdiego / GameTheme.cs
Last active May 1, 2020
Simple Save System for Themes in Unity
View GameTheme.cs
using UnityEngine;
[CreateAssetMenu(menuName = "Settings/Theme")]
public class GameTheme : ScriptableObject
{
public Color foregroundColor;
public Color backgroundColor;
}
@Dssdiego
Dssdiego / AppVersion.cs
Last active Apr 28, 2020
Keeps the PlayerSettings info of the Unity Project in a separate data asset
View AppVersion.cs
using UnityEngine;
[CreateAssetMenu (menuName = "App Version")]
public sealed class AppVersion : ScriptableObject
{
/// <summary>
/// Game Name
/// </summary>
[Header("Settings")]
[SerializeField] private string gameName;
View IntLogger.cs
using UnityEngine;
namespace Architecture
{
public class IntLogger : MonoBehaviour
{
public IntVariable variable;
public string textBeforeVariable;
public string textAfterVariable;
View TextIntSetter.cs
using TMPro;
using UnityEngine;
namespace Architecture
{
[RequireComponent(typeof(TextMeshProUGUI))]
public class TextIntSetter : MonoBehaviour
{
private TextMeshProUGUI textUI;
public IntVariable variable;
@Dssdiego
Dssdiego / ImageFillSetter.cs
Last active Apr 28, 2020
Unity Image Fill Setter
View ImageFillSetter.cs
public class ImageFillSetter : MonoBehaviour {
public FloatReference Variable;
public FloatReference Max;
public Image image;
private void Update() {
Image.fillAmount = Mathf.Clamp(Variable.Value / Max.Value);
}
}
View FloatVariable.cs
using UnityEngine;
using UnityEngine.Events;
[CreateAssetMenu(menuName = "Variable/Float")]
public class FloatVariable : ScriptableObject
{
#if UNITY_EDITOR
[Multiline]
public string description;
#endif
View IntVariable.cs
using UnityEngine;
using UnityEngine.Events;
[CreateAssetMenu(menuName = "Variable/Int")]
public class IntVariable : ScriptableObject
{
#if UNITY_EDITOR
[Multiline]
public string description;
#endif
@Dssdiego
Dssdiego / Preferences.java
Last active Apr 22, 2020
Android Get/Save Preferences
View Preferences.java
private static final String SOME_KEY = "KEY_ANYTHING_YOU_WANT"
public class Preference {
// Set Prefrence
SharedPreferences.Editor e = PreferenceManager.getDefaultSharedPreferences(context).edit();
e.putBoolean(SOME_KEY, true);
e.apply();
// Get Preference
return PreferenceManager.getDefaultSharedPreferences(context).getBoolean(SOME_KEY, false);
You can’t perform that action at this time.