mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Def load selection and basic def alteration
This commit is contained in:
parent
f78d85de3b
commit
0364322d46
311 changed files with 15823 additions and 1151 deletions
19
Assets/Scripts/Extensions/IListExtensions.cs
Normal file
19
Assets/Scripts/Extensions/IListExtensions.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public static class IListExtensions
|
||||
{
|
||||
public static bool NullOrEmpty<T>(this IList<T> list)
|
||||
{
|
||||
return list == null || list.Any() == false;
|
||||
}
|
||||
|
||||
public static bool NotNullOrEmpty<T>(this IList<T> list)
|
||||
{
|
||||
return NullOrEmpty<T>(list) == false;
|
||||
}
|
||||
}
|
||||
|
11
Assets/Scripts/Extensions/IListExtensions.cs.meta
Normal file
11
Assets/Scripts/Extensions/IListExtensions.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a030b2589ac872442a0d1aea7f5b5e70
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
24
Assets/Scripts/Extensions/TransformExtensions.cs
Normal file
24
Assets/Scripts/Extensions/TransformExtensions.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public static class TransformExtensions
|
||||
{
|
||||
public static Transform FindDeepChild(this Transform parent, string childName)
|
||||
{
|
||||
Queue<Transform> queue = new Queue<Transform>();
|
||||
queue.Enqueue(parent);
|
||||
|
||||
while (queue.Count > 0)
|
||||
{
|
||||
var c = queue.Dequeue();
|
||||
if (c.name == childName)
|
||||
return c;
|
||||
foreach (Transform t in c)
|
||||
queue.Enqueue(t);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
11
Assets/Scripts/Extensions/TransformExtensions.cs.meta
Normal file
11
Assets/Scripts/Extensions/TransformExtensions.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 859d0be8594b5bc46aa3fb70f78149ee
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue