public virtual IoObject proto(IoState state) { IoObject pro = new IoObject(); pro.state = state; pro.createSlots(); pro.createProtos(); pro.uniqueId = 0; state.registerProtoWithFunc(name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto))); return(pro); }
public virtual IoObject clone(IoState state) { IoObject proto = state.protoWithInitFunc(name); IoObject o = Activator.CreateInstance(this.GetType()) as IoObject; uniqueIdCounter++; o.uniqueId = uniqueIdCounter; o.state = proto.state; o.createSlots(); o.createProtos(); o.protos.Add(proto); cloneSpecific(this, o); return(o); }
public virtual IoObject proto(IoState state) { IoObject pro = new IoObject(); pro.state = state; pro.createSlots(); pro.createProtos(); pro.uniqueId = 0; state.registerProtoWithFunc(name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto))); return pro; }