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
[Serializable] | |
public class MyComponentData | |
{ | |
public Vector3 pos; | |
public string name; | |
} | |
public class MyComponent : MonoBehaviour | |
{ |
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; | |
using UnityEngine.Events; | |
using UnityEngine.UI; | |
public class CountdownController : MonoBehaviour | |
{ | |
public int seconds = 10; | |
public Text countdown; |
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
[RequireComponent(typeof(Dropdown))] | |
public class SaveDropdownValue : MonoBehaviour | |
{ | |
const string PrefName = "optionvalue"; | |
private Dropdown _dropdown; | |
void Awake() | |
{ | |
_dropdown = GetComponent<Dropdown>(); |
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 System.Collections.Generic; | |
using UnityEngine; | |
public class SliderVolumeValue : MonoBehaviour | |
{ | |
const float DefaultVolume = 1f; | |
// Reference to Audio Source component | |
private AudioSource audioSrc; |
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 System.Collections.Generic; | |
using UnityEngine; | |
public class Card | |
{ | |
public int CardID { get; set; } | |
public int CardLvl { get; set; } | |
public bool CardPlayed { get; set; } |
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; | |
/// <summary> | |
/// Aspect ratio controller. Must be attached to the main camera. | |
/// </summary> | |
[RequireComponent(typeof(Camera))] | |
public class AspectRatio : MonoBehaviour | |
{ | |
[Tooltip("The idea ratio that you want the world rendered at")] | |
public float perfectRatio = 16f / 9f; |
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
#include <iostream> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
#include <string.h> | |
#include <string> | |
using namespace std; |
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
#include <iostream> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
#include <string.h> | |
#include <string> | |
using namespace std; |
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
public class GameSystems : MonoBehaviour | |
{ | |
private static GameSystems _instance; | |
public static GameSystems Instance | |
{ | |
get | |
{ | |
if (_instance == null) | |
{ |
OlderNewer