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
// the idea from http://www.agiledeveloper.com/articles/cloning072002.htm | |
using System; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
public class Person : ICloneable | |
{ |
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 static class VectorExtensions | |
{ | |
/// <summary> | |
/// 将坐标点移动四分之一个圆 | |
/// </summary> | |
/// <param name="pivot">原点</param> | |
/// <param name="before">移动前的坐标点</param> | |
/// <returns>移动后的坐标点</returns> |
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
git branch -r --merged | egrep -v "(^\*|master|dev)" | sed s/origin\\/// | xargs -I{} git push origin --delete {} |
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
/* | |
* https://en.wikipedia.org/wiki/Tree_(data_structure) | |
*/ | |
private static List<GameObject> Traverse(GameObject parent, Type type) | |
{ | |
List<GameObject> children = new List<GameObject>(); | |
foreach (Transform node in parent.transform) | |
children.Add(node.gameObject); |