예제 #1
0
    public Actor Spawn(Type type, object outer, SpawnParameters spawnArgs)
    {
        if (!typeof(Actor).IsAssignableFrom(type))
        {
            throw new Exception("Can only spawn actors!");
        }
        int classID = SerializableObject.StaticClassIDSlow(type);

        return(InternalSpawn(null, type, classID, outer, spawnArgs));
    }
예제 #2
0
 public Actor Spawn(ActorSpawnTag tag, object outer, SpawnParameters spawnArgs)
 {
     if (tag.type == null)
     {
         throw new Exception("ActorSpawnTag cannot load type: " + tag.typeName);
     }
     else
     {
         int classID = SerializableObject.StaticClassIDSlow(tag.type);
         return(InternalSpawn(tag, tag.type, classID, outer, spawnArgs));
     }
 }
예제 #3
0
 static SerializableObjectStaticClass()
 {
     _staticClassID = SerializableObject.StaticClassIDSlow(typeof(T));
 }