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.Windows.Input; | |
// TODO: Namespace | |
/// <summary> | |
/// Simple implementation of ICommand, usable in ViewModels as Commands. | |
/// Acts like a common RelayCommand. | |
/// Example written in C# 6. | |
/// </summary> |
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 Newtonsoft.Json; | |
using System.IO; | |
using System.Text; | |
// TODO: Namespace | |
/// <summary> | |
/// De- or serializes objects to output files as JSON. | |
/// </summary> | |
/// <typeparam name="T">Object type to save or load</typeparam> |
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.ComponentModel; | |
using System.Runtime.CompilerServices; | |
// TODO: Namespace | |
/// <summary> | |
/// Base class for ViewModels, implements OnPropertyChanged. Nothing further to do. | |
/// </summary> | |
public partial class ViewModelBase : INotifyPropertyChanged | |
{ |
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 UnityEngine; | |
[RequireComponent(typeof(Light))] | |
public class TimeCycle : MonoBehaviour | |
{ | |
public float CurrentTimeOfDay = 0; | |
public DayTime CurrentDayTime; | |
public float Hour = 0; |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class CarController : MonoBehaviour | |
{ | |
public List<AxleInfo> AxleInfos; | |
public float MaxMotorTorque; | |
public float MaxSteeringAngle; |
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 class DelegateCommand<T> : ICommand where T : class | |
{ | |
private readonly Predicate<T> _canExecute; | |
private readonly Action<T> _execute; | |
public DelegateCommand(Action<T> execute) | |
: this(execute, 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 System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEngine; | |
// Neat editor script for grouping objects in hierarchy by /u/SocialOfficer | |
// | |
public class HierarchyHelper | |
{ | |
public static string Suffix = "_Root"; |
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
{ | |
"crews": [ | |
"IGN", | |
"MP3", | |
"LSB", | |
"ZBC", | |
"RDR", | |
"TMC", | |
"MHE", | |
"LAN", |
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.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using static System.Console; | |
namespace HttpAlive | |
{ | |
class Program | |
{ |
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"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true"> | |
<match url="(.*)" /> | |
<conditions logicalGrouping="MatchAny"> | |
<add input="{SERVER_PORT_SECURE}" pattern="^0$" /> | |
</conditions> |
OlderNewer