// Start is called before the first frame update void Start() { ChildName childName = new ChildName(); name = childName.Name(); destination = endPoint(); }
protected AbstractConstruct(BinaryReader reader, ConstructCollection constructs) { if (reader == null) { throw new ArgumentNullException("reader"); } if (constructs == null) { throw new ArgumentNullException("construct"); } this.constructs = constructs; byte[] buffer = new byte[STR_LENGTH]; reader.Read(buffer, 0, STR_LENGTH); ParentName = Encoding.ASCII.GetString(buffer); ParentName = ParentName.Substring(0, ParentName.IndexOf('\0')); reader.Read(buffer, 0, STR_LENGTH); ChildName = Encoding.ASCII.GetString(buffer); ChildName = ChildName.Substring(0, ChildName.IndexOf('\0')); Origin = ConvertData.ToVector3(reader); }
public bool Equals(HorseChildDetails raceToCompareTo) { if (raceToCompareTo == null) { return(false); } return(ChildName.ToLower().Equals(raceToCompareTo.ChildName.ToLower())); }
public bool Equals(SingleContent other) { if (other == null) { return(false); } return(Name.Equals(other.Name) && ChildName.Equals(other.ChildName)); }
public Component Find(string RelativePath) { // ------------------------------------------------------ // Will look for a child component using the relative // path passed in. e.g. Child/SubChild // ------------------------------------------------------ string ChildName, Remainder; int PosDelimiter = RelativePath.IndexOf(Delimiter); if (PosDelimiter != -1) { ChildName = RelativePath.Substring(0, PosDelimiter); Remainder = RelativePath.Substring(PosDelimiter + 1); } else { ChildName = RelativePath; Remainder = ""; } if (ChildName == "..") { if (Remainder == "") { return(Parent); } else { return(Parent.Find(Remainder)); } } foreach (Component Child in ChildNodes) { if (Child.Name.ToLower() == ChildName.ToLower()) { if (Remainder == "") { return(Child); } else { return(Child.Find(Remainder)); } } } return(null); }
private void ActChildColumn_Click(System.Object sender, System.EventArgs e) { // ----- Check for valid data. if (ChildName.Text.Trim().Length == 0) { MessageBox.Show("Please provide a column name."); ChildName.Focus(); return; } if (ChildExpression.Text.Trim().Length == 0) { MessageBox.Show("Please provide an expression."); ChildExpression.Focus(); return; } // ----- Add the new column. try { ExampleData.Tables["Child"].Columns.Add(ChildName.Text.Trim(), Type.GetType("System." + ChildDataType.SelectedItem.ToString()), ChildExpression.Text.Trim()); } catch (Exception ex) { MessageBox.Show("Could not add the column: " + ex.Message); return; } // ----- Refresh the columns used for quick computing. RefreshComputeColumns(); // ----- Reset for another column. ChildName.Clear(); ChildDataType.SelectedIndex = 0; ChildExpression.Clear(); }
public static XmlNode Find(XmlNode Node, string NamePath) { // ---------------------------------------------------- // Find a child with the specified NamePath. NamePath // can be a single child name or a path delimited with // '/' characters e.g. ChildNode/SubChildNode or /RootNode/ChildNode // Returns null if no child found. // ---------------------------------------------------- if (Node == null) { return(null); } if (NamePath == "") { throw new Exception("Cannot call FindByName with a blank path"); } if (NamePath[0] == Delimiter) { Node = Node.OwnerDocument.DocumentElement; int Pos = NamePath.IndexOf(Delimiter, 1); string RootName; if (Pos == -1) { RootName = NamePath.Substring(1); NamePath = ""; } else { RootName = NamePath.Substring(1, Pos - 1); NamePath = NamePath.Substring(Pos + 1); } if (RootName.ToLower() != Name(Node).ToLower()) { return(null); } if (NamePath == "") { return(Node); } } string ChildName, Remainder; int PosDelimiter = NamePath.IndexOf(Delimiter); if (PosDelimiter != -1) { ChildName = NamePath.Substring(0, PosDelimiter); Remainder = NamePath.Substring(PosDelimiter + 1); } else { ChildName = NamePath; Remainder = ""; } if (ChildName == "..") { return(Find(Node.ParentNode, Remainder)); } else if (ChildName.Length > 0 && ChildName[0] == '@') { return(Node.Attributes[ChildName.Substring(1)]); } else { foreach (XmlNode Child in Node.ChildNodes) { if (Name(Child).ToLower() == ChildName.ToLower()) { if (Remainder == "") { return(Child); } else { return(Find(Child, Remainder)); } } } } return(null); }
public override int GetHashCode() { return(ChildName.ToLower().GetHashCode()); }
protected virtual void SpawnSkin() { if (skinOptions != SpawnSkinOptions.None) { //drop current droppable item if (equip) { equip.DropCurrentItem(); } //destroy current skin if (curSkin) { Destroy(curSkin); } if (skinOptions == SpawnSkinOptions.FromData) { if (curData.setSkin) { //spawn new skin curSkin = Instantiate(curData.skinPrefab, transform.position, transform.rotation); curSkin.transform.SetParent(transform); //set Rotation curSkin.transform.localEulerAngles = curData.skinRotation; itemSpawnLocation = curData.itemSpawnLocation; //set collider size var capsule = col as CapsuleCollider2D; if (capsule) { capsule.size = curData.skinSize; capsule.offset = new Vector2(0, capsule.size.y / 2); } } } else if (skinOptions == SpawnSkinOptions.Override) { curSkin = Instantiate(spawnSkinOverride, transform.position, transform.rotation); curSkin.transform.SetParent(transform); } else if (skinOptions == SpawnSkinOptions.Child) { curSkin = childSkinOverride; } } if (curSkin) { //set animator var an = curSkin.GetComponent <Animator>(); if (anim) { anim.Animator = an; } itemSpawnTrans = curSkin.transform.FindDeepChild(itemSpawnLocation.stringValue); GetMaterials(); } else { Debug.Log("No skin is set up on " + gameObject.name + "! This unit will not be able to use items."); } }
public ChildCombination(ChildSprite childSprite, ChildName childName) { ChildSprite = childSprite; ChildName = childName; }