void OnTriggerExit(Collider other) { Debug.Log("Hello"); DoorPivot.SetBool("OpenDoor", false); if (!DestinationObject.GetDraggedItem().activeSelf) { DoorPivot.SetBool("OpenDoor", false); } }
void HandleWetClothes() { string destination = DestinationObject.GetWetClothesDestination(); if (destination == "Dryer") { Decisions.AddChoice("Dryer"); } else if (destination == "Clothesline") { Decisions.AddChoice("Clothesline"); } }
void OnMouseDown() { DestinationObject.SetItem(this.gameObject); mZCoord = Camera.main.WorldToScreenPoint( gameObject.transform.position).z; // Store offset = gameobject world pos - mouse world pos mOffset = gameObject.transform.position - GetMouseAsWorldPoint(); }
void OnMouseUp() { if (DestinationObject.GetIsAdding() == true) { if (this.gameObject.name == "WetClothes") { HandleWetClothes(); } else if (this.gameObject.name == "Clothes") { this.gameObject.SetActive(false); Tasks.ShowNextTask(); return; } else { Decisions.AddChoice(DestinationObject.GetDraggedItem().name); } this.gameObject.SetActive(false); Tasks.ShowNextTask(); } Tasks.SetIsAnimationFinished(false); }
private void ValidateProperty() { if (_propertyInfo == null) { throw new FluentBuilderException(string.Format("Property \"{0}\" not found - Object \"{1}\"", MemberName, DestinationObject.GetType())); } if (!_propertyInfo.CanWrite) { throw new FluentBuilderException(string.Format("Property \"{0}\" must have a setter - Object \"{1}\"", MemberName, DestinationObject.GetType())); } if (!_propertyInfo.PropertyType.IsAssignableFrom(MemberNewValue.GetType())) { var messageBuilder = new StringBuilder(); messageBuilder.AppendFormat("Value must be of the same type of the property \"{0}\" - Object \"{1}\"\n", MemberName, DestinationObject.GetType()); messageBuilder.AppendFormat("Informed type: {0}\n", MemberNewValue.GetType()); messageBuilder.AppendFormat("Property type: {0}", _propertyInfo.PropertyType); throw new FluentBuilderException(messageBuilder.ToString()); } }
public static void Test(SourceObject source, DestinationObject destination, object mapper, object context) { destination = destination ?? new DestinationObject(); }
public static void ConvertLambda(SourceObject source, DestinationObject destination) { destination.Destination = Lambda(); }
public static void Convert(SourceObject source, DestinationObject destination) { destination.Destination = source.Source; }
public static GameObject GetCurrentObject() { DestinationObject destination = new DestinationObject(); return(destination.currentObject); }
private void ValidateField() { if (_fieldInfo == null) { throw new FluentBuilderException(string.Format("Field \"{0}\" not found - Object \"{1}\"", MemberName, DestinationObject.GetType())); } if (!_fieldInfo.FieldType.IsInstanceOfTypeBase(MemberNewValue)) { var messageBuilder = new StringBuilder(); messageBuilder.AppendFormat("Value must be of the same type of the field \"{0}\" - Object \"{1}\"\n", MemberName, DestinationObject.GetType()); messageBuilder.AppendFormat("Informed type: {0}\n", MemberNewValue.GetType()); messageBuilder.AppendFormat("Field type: {0}", _fieldInfo.FieldType); throw new FluentBuilderException(messageBuilder.ToString()); } }