Esempio n. 1
0
        public MonoBehaviorAssetData(BinaryReader reader, int length)
        {
            int startOffset = (int)reader.BaseStream.Position;

            gameObject = new AssetPtr(reader);
            enabled    = reader.ReadInt32();
            script     = new AssetPtr(reader);
            name       = reader.ReadAlignedString();
            int headerLen = (int)reader.BaseStream.Position - startOffset;

            switch (script.pathID)
            {
            case LevelBehaviorData.PathID:
                data = new LevelBehaviorData(reader, length - headerLen);
                break;

            case LevelCollectionBehaviorData.PathID:
                data = new LevelCollectionBehaviorData(reader, length - headerLen);
                break;

            case BeatmapDataBehaviorData.PathID:
                data = new BeatmapDataBehaviorData(reader, length - headerLen);
                break;

            default:
                data = new UnknownBehaviorData(reader, length - headerLen);
                break;
            }
        }
Esempio n. 2
0
 public AssetObject RemoveScript(BehaviorData data)
 {
     return(RemoveAsset(ao => ao.data.GetType().Equals(typeof(MonoBehaviorAssetData)) &&
                        (ao.data as MonoBehaviorAssetData).data.Equals(data)));
 }
Esempio n. 3
0
 public abstract bool Equals(BehaviorData data);