public override ChangeData ToChangeData() { return(new ObjectMoveChangeData() { ObjectID = this.Object.ObjectID, SourceID = ObjectID.GetID(this.Source), SourceLocation = this.SourceLocation, DestinationID = ObjectID.GetID(this.Destination), DestinationLocation = this.DestinationLocation }); }
static private int CheckIfObjectIsTagged(GameObject obj) { ObjectID objectID = obj.GetComponent <ObjectID>(); if (objectID == null) { return(-1); } else { return(objectID.GetID()); } }
//check if an object is tagged with an id private static int CheckIfObjectIsTagged(GameObject obj) //检查该物体是否被标记上了id { ObjectID objectID = obj.GetComponent <ObjectID>(); if (objectID == null) { return(-1); } else { return(objectID.GetID()); } }