Created
July 19, 2015 09:25
-
-
Save iwashihead/3b0711172bed4f691d10 to your computer and use it in GitHub Desktop.
ScriptacleObjectのサンプルデータクラス
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; | |
[System.SerializableAttribute] | |
public class MyData : ICloneable{ | |
public enum Type{ | |
NONE, | |
LEFT, | |
RIGHT | |
} | |
public int id; | |
public string name; | |
public Texture2D image; | |
public Color color; | |
public int type; | |
public object Clone () | |
{ | |
MyData copy = new MyData(); | |
copy.id = id; | |
copy.name = name; | |
copy.color = color; | |
copy.type = type; | |
return copy; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment