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 struct Buffer : IBufferElementData | |
{ | |
int x; | |
} | |
public struct Data : IComponentData | |
{ | |
int y; | |
} |
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 PositionComponent : IComponent | |
{ | |
int x; | |
int y; | |
} | |
I change to: | |
public class PositionComponent : IComponent | |
{ |
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; | |
// Wait for a simple boolean predicate to be true. Example: | |
// | |
// private IEnumerator HandleDeath() { | |
// yield return new WaitWhile(() => hitPoints != 0); | |
// Instantiate(SuperCoolDeathFXPrefab); | |
// } | |
// |
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 IsOverlappingBehavior : MonoBehavior | |
{ | |
public CapsuleCollider capsule; | |
public bool IsOverlapping { get; private set; } | |
private void Update() | |
{ | |
IsOverlapping = false; | |
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 IsOverlappingBehavior : MonoBehavior | |
{ | |
public CapsuleCollider capsule; | |
public bool IsOverlapping { get; private set; } | |
private void Update() | |
{ | |
IsOverlapping = false; | |
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 static class PhysicsExtensions | |
{ | |
public static void ToWorldSpaceCapsule( | |
this CapsuleCollider capsule, | |
out Vector3 point0, out Vector3 point1, out float radius); | |
public static void ToWorldSpaceBox( | |
this BoxCollider box, | |
out Vector3 center, out Vector3 halfExtents, out Quaternion orientation); | |
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 Comments : MonoBehaviour | |
{ | |
[Multiline] | |
public string text; | |
} |
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
Windows Registry Editor Version 5.00 | |
; Add run as administrator to the menu for autohotkey scripts | |
; howtogeek.com | |
[HKEY_CLASSES_ROOT\AutoHotkeyScript\Shell\runas\Command] | |
@="\"C:\\Program Files\\AutoHotkey\\AutoHotkey.exe\" \"%1\" %*" | |
"IsolatedCommand"="\"C:\\Program Files\\AutoHotkey\\AutoHotkey.exe\" \"%1\" %*" |
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; | |
/// <summary> | |
/// The State class is a specialized StateMachineBehaviour that provides an event interface for | |
/// the messages that Unity calls. Perhaps more importantly, States communicate with the next state | |
/// (when transitioning into something else) or the previous state (when transitioning from | |
/// something else). This allows the end-programmer to utilize transition times without losing the | |
/// reliability of events that can signal changes in control contexts (otherwise there are overlaps | |
/// when 2 control contexts are simultaneously valid). |
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
type MockRoundTripper struct { | |
Code int | |
Body string | |
Err error | |
Called int | |
} | |
func (t *MockRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { | |
t.Called += 1 |