/// <summary> /// Exports this game object to file /// </summary> /// <param name="BW">Open Writer</param> public override void Export(BinaryWriter BW) { base.Export(BW); BW.Write(UnknownInt); ObjectRotation.Export(BW); ObjectPosition.Export(BW); ObjectScale.Export(BW); BW.Write(UnknownHeaderEnd); }
public bool Equals(IMarker other) { return (other != null && Id.Equals(other.Id) && Name == other.Name && RelativePosition.Equals(other.RelativePosition) && RelativeRotationEuler.Equals(other.RelativeRotationEuler) && ObjectScale.Equals(other.ObjectScale) && CreatedTime.Equals(other.CreatedTime) && LastUpdatedTime.Equals(other.LastUpdatedTime) && LastUsedTime.Equals(other.LastUsedTime)); }
public override int GetHashCode() { unchecked { var hashCode = Id.GetHashCode(); hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0); hashCode = (hashCode * 397) ^ RelativePosition.GetHashCode(); hashCode = (hashCode * 397) ^ RelativeRotationEuler.GetHashCode(); hashCode = (hashCode * 397) ^ ObjectScale.GetHashCode(); hashCode = (hashCode * 397) ^ CreatedTime.GetHashCode(); hashCode = (hashCode * 397) ^ LastUpdatedTime.GetHashCode(); hashCode = (hashCode * 397) ^ LastUsedTime.GetHashCode(); return(hashCode); } }
public override void Create(int number) { GameObject go = GameObject.CreatePrimitive(PrimitiveType.Sphere); go.name = $"Sphere_{number}"; ObjectTranslation t = go.AddComponent <ObjectTranslation>(); t.Set(Random.Range(-2.0f, 2.0f), Random.Range(-2.0f, 2.0f), Random.Range(-2.0f, 2.0f)); ObjectScale scale = go.AddComponent <ObjectScale>(); scale.Scale = Random.Range(0.5f, 1.5f); }
void Start() { objectDictionary = new Dictionary <int, string>(); pathDictionary = new Dictionary <string, int>(); objectDropdown = GetComponentInChildren <Dropdown>(); objectDropdown.onValueChanged.AddListener(delegate { SetPath(); }); ModuleBuilder.FillSymbolDropdown(ref objectDropdown, ref objectDictionary, typeof(ObjectList)); foreach (KeyValuePair <int, string> kvp in objectDictionary) { pathDictionary[OBJECT_PATH + kvp.Value] = kvp.Key; } ObjectEuler.ValueDelegate(SetEuler); ObjectScale.ValueDelegate(SetScale); Trigger.onValueChanged.AddListener(delegate { SetToggle(); }); Jointed.onValueChanged.AddListener(delegate { SetJointed(); }); }