public Prop create_prop(IPositionable position, string prefab_name, double angle = 0) { var msg = new CreatePropMessage() { Position = position.position, Type = prefab_name, Angle = angle }; return(new Prop(client.RemoteCall <PropMessage>(Contracts.CreateProp, msg), this)); }
public Prop create_prop(IPositionable position, string prefab_name, double angle = 0) { var msg = new CreatePropMessage() { Position = position.position, Type = prefab_name, Angle = angle }; Prop shell = ObjectStorage.Instance.Props.CreateShell(); client.RemoteCall(Contracts.CreateProp, msg, (ret, error) => { if (error != null) { shell.AssignData(null, error); return(null); } PropData data = (PropData)ret; ObjectStorage.Instance.Props.AddDataToDictionary(data); shell.AssignData(data); return(null); }); return(shell); }