Skip to content

Instantly share code, notes, and snippets.

View SH42913's full-sized avatar

Farley Drunk SH42913

View GitHub Profile
@SH42913
SH42913 / in_bench.cs
Last active January 16, 2024 16:28
Benchmarking of in modifier in C#
private const int CallDepth = 300;
public static class MorpehExt
{
public static float DoGetterExt(this in MorpehBaseContext.Component3 c3) => c3.Value1 * c3.Value2;
}
public struct Component1
{
public int Value;
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeAttributes/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeLocalFunctionBody/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeMethodOrOperatorBody/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassCanBeSealed_002EGlobal/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassCanBeSealed_002ELocal/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlig
@SH42913
SH42913 / Morpeh-Templates.DotSettings
Last active September 16, 2023 07:56
Morpeh-Templates
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=7F292FD322E41246839AFE76D9914B34/Entry/=0D3F26BF1543F7428813D7AFE13FCDEB/EntryName/@EntryValue">Assembly Definition File</s:String>
<s:Int64 x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=7F292FD322E41246839AFE76D9914B34/Entry/=0D3F26BF1543F7428813D7AFE13FCDEB/Position/@EntryValue">13</s:Int64>
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=7F292FD322E41246839AFE76D9914B34/Entry/=105446EB0AFDA64E83433A8592962D27/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/QuickList/=7F292FD322E41246839AFE76D9914B34/Entry/=105446EB0AFDA64E83433A8592962D27/EntryName/@EntryValue">provider</
@SH42913
SH42913 / .gitignore
Last active January 21, 2023 07:30
My Unity .gitignore
# This .gitignore file should be placed at the root of your Unity project directory
#
# Based on https://github.com/github/gitignore/blob/master/Unity.gitignore
#
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
@SH42913
SH42913 / CollisionListener.cs
Last active January 16, 2024 16:29
Collision Listener for Morpeh-ECS
using System;
using System.Diagnostics;
using Morpeh;
using UnityEngine;
using Utils;
[AddComponentMenu("")]
public sealed class CollisionListener : MonoBehaviour {
public IEntity ownerEntity;
public Collider[] colliders;