This file contains 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
import React, { Component, ReactNode } from "react" | |
interface Props { | |
delayMs: number, | |
children: ReactNode, | |
} | |
interface State { | |
enabled: boolean, | |
} |
This file contains 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
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:controls="clr-namespace:CarouselView.FormsPlugin.Abstractions;assembly=CarouselView.FormsPlugin.Abstractions" | |
xmlns:local="clr-namespace:StackLayoutBug" | |
x:Class="StackLayoutBug.MainPage" | |
SizeChanged="OnPageSizeChanged"> | |
<Grid ColumnSpacing="0" RowSpacing="0"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto"/> |
This file contains 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
// Author: Mathias Soeholm | |
// Date: 05/10/2016 | |
// No license, do whatever you want with this script | |
using UnityEngine; | |
using UnityEngine.Serialization; | |
[ExecuteInEditMode] | |
public class TubeRenderer : MonoBehaviour | |
{ | |
[SerializeField] Vector3[] _positions; |
This file contains 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; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
namespace DancePadInput | |
{ | |
public enum Player | |
{ | |
Any, |
This file contains 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 sealed class Singleton | |
{ | |
private static readonly Singleton instance = new Singleton(); | |
public static Singleton Instance { get { return instance; } } | |
static Singleton() {} | |
private Singleton() {} | |
} |
This file contains 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.Generic; | |
using System.Linq; | |
using UnityEngine; | |
public class LinqTest : MonoBehaviour | |
{ | |
public class MyClass | |
{ | |
public Vector3 MyVector; | |
} |
This file contains 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 UnityEditor; | |
using UnityEngine; | |
public static class NGUIResizeCollider | |
{ | |
[MenuItem("Kiloo/NGUI Tools/Resize Collider")] | |
private static void ResizeCollider() | |
{ | |
if (Selection.activeGameObject != null && (Selection.activeGameObject.collider as BoxCollider) != null) | |
{ |
This file contains 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 GetComponentExample : MonoBehaviour | |
{ | |
// First we need a reference to the other gameobject | |
// You can make a public field and assign a prefab in the inspector | |
public GameObject somePrefab; | |
// Or you can search for a gameobject and assign it to a variable | |
private GameObject gameObjectFoundBySearch; |
This file contains 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.Linq; | |
class FizzBuzz | |
{ | |
static void Main() | |
{ | |
Console.WriteLine( | |
String.Join( | |
Environment.NewLine, |