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
| class Order { | |
| var _id; | |
| var _reference; | |
| var date; | |
| var code; | |
| List<String> bookings; | |
| Order(this._id, this._reference, {this.date}); | |
| Order.withDiscount(this._id, this._reference, [this.code]) { | |
| date = DateTime.now(); |
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; | |
| namespace Ditzelgames | |
| { | |
| public static class PhysicsHelper | |
| { | |
| public static void ApplyForceToReachVelocity(Rigidbody rigidbody, Vector3 velocity, float force = 1, ForceMode mode = ForceMode.Force) | |
| { | |
| if (force == 0 || velocity.magnitude == 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 UnityEngine; | |
| using UnityEngine.UI; | |
| /* | |
| Radial Layout Group by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk | |
| Copyright (c) 2015 | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
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
| Shader "UnityCommunity/Sprites/SpriteDropShadow" | |
| { | |
| Properties | |
| { | |
| [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
| _Color ("Tint", Color) = (1,1,1,1) | |
| [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0 | |
| _ShadowColor ("Shadow", Color) = (0,0,0,1) | |
| _ShadowOffset ("ShadowOffset", Vector) = (0,-0.1,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
| Shader "Custom/WireFrame" { | |
| Properties { | |
| _LineColor ("LineColor", Color) = (1, 1, 1, 1) | |
| _MainColor ("_MainColor", Color) = (1, 1, 1, 1) | |
| _LineWidth ("Line width", Range(0, 1)) = 0.1 | |
| _ParcelSize ("ParcelSize", Range(0, 100)) = 1 | |
| } | |
| SubShader { | |
| Tags { "Queue"="Transparent" "RenderType"="Transparent" } |
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 HexGridLayout : LayoutGroup { | |
| const float SQUARE_ROOT_OF_3 = 1.73205f; | |
| public enum Axis { Horizontal = 0, Vertical = 1 } | |
| public enum Constraint { Flexible = 0, FixedColumnCount = 1, FixedRowCount = 2 } |
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; | |
| using UnityEngine; | |
| public class Sokoban : MonoBehaviour | |
| { | |
| // タイルの種類 | |
| private enum TileType | |
| { | |
| NONE, // 何も無い |
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; | |
| /* | |
| Radial Layout Group by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk | |
| Copyright (c) 2015 | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
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.Generic; | |
| /// <summary> | |
| /// Modified Gradient effect script from http://answers.unity3d.com/questions/1086415/gradient-text-in-unity-522-basevertexeffect-is-obs.html | |
| /// -Uses Unity's Gradient class to define the color | |
| /// -Offset is now limited to -1,1 | |
| /// -Multiple color blend modes | |
| /// | |
| /// Remember that the colors are applied per-vertex so if you have multiple points on your gradient where the color changes and there aren't enough vertices, you won't see all of the colors. | |
| /// </summary> |
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; | |
| using UnityEngine.EventSystems; | |
| using UnityEngine.UI; | |
| public class RadialSlider : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler | |
| { | |
| bool isPointerDown = false; | |
| // Called when the pointer enters our GUI component. |
NewerOlder