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; | |
public class SpriteScroll : MonoBehaviour | |
{ | |
[SerializeField] | |
private float scrollSpeed = 1f; | |
private float rightEdge; | |
private float leftEdge; | |
private Vector3 distanceBetweenEdges; |
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; | |
public class ChooseRandomColor : MonoBehaviour | |
{ | |
public void ChangeImageColor() | |
{ | |
GetComponent<Image>().color = RandomColor(); | |
} |
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; | |
public class ChooseRandomColor : MonoBehaviour | |
{ | |
private void Start() | |
{ | |
GetComponent<Button>().onClick.AddListener(ChangeImageColor); | |
} |
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; | |
public class GroundPlacementController : MonoBehaviour | |
{ | |
[SerializeField] | |
private GameObject placeableObjectPrefab; | |
[SerializeField] | |
private KeyCode newObjectHotkey = KeyCode.A; |
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; | |
using System.Collections.Generic; | |
using System.IO; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class ImageLoader : MonoBehaviour | |
{ | |
[SerializeField] |
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; | |
[RequireComponent(typeof(SteamVR_TrackedController))] | |
public class DashController : MonoBehaviour | |
{ | |
[SerializeField] | |
private float minDashRange = 0.5f; | |
[SerializeField] | |
private float maxDashRange = 40f; |
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.IO; | |
using System.IO.Compression; | |
public static class ByteArrayExtensions | |
{ | |
public static byte[] Compress(this byte[] raw) | |
{ | |
using (MemoryStream memory = new MemoryStream()) | |
{ | |
using (GZipStream gzip = new GZipStream(memory,CompressionMode.Compress, true)) |
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; | |
public class BrushSizeSlider : MonoBehaviour | |
{ | |
private Slider slider; | |
public static int BrushSize { get; private set; } | |
private void Start() |
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.Networking; | |
public class PlayerBrush : NetworkBehaviour | |
{ | |
#region Initialization | |
[Server] | |
private void Start() | |
{ | |
var data = PaintCanvas.GetAllTextureData(); |
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; | |
public class ColorPicker : MonoBehaviour | |
{ | |
public static Color SelectedColor { get; private set; } | |
[SerializeField] | |
private Renderer selectedColorPreview; | |
private void Update() |