protected override void Start() { base.Start(); anim = GetComponent <Animator> (); movement = FindObjectOfType <ControlMovement>(); buttonSwitcher = FindObjectOfType <ButtonSwitcher>(); }
// Use this for initialization void Start() { controlMovement = FindObjectOfType<ControlMovement>(); buttonSwitcher = FindObjectOfType<ButtonSwitcher>(); npc = this.transform.GetComponentInParent<NPC>(); //Debug.Log(npc.name); inventroy = FindObjectOfType<Inventory>(); }
// Use this for initialization void Start() { controlMovement = FindObjectOfType <ControlMovement>(); buttonSwitcher = FindObjectOfType <ButtonSwitcher>(); npc = this.transform.GetComponentInParent <NPC>(); //Debug.Log(npc.name); inventroy = FindObjectOfType <Inventory>(); }
private void CheckMouseSwitcher() { if ((bool)Left.IsChecked) { MenuButton = ButtonSwitcher.LeftButton; } if ((bool)LeftRight.IsChecked) { MenuButton = ButtonSwitcher.LeftRightButton; } if ((bool)Right.IsChecked) { MenuButton = ButtonSwitcher.RightButton; } UpdateText(MenuButton); }
private void UpdateText(ButtonSwitcher MenuButton) { string text = string.Empty; switch (MenuButton) { case ButtonSwitcher.LeftButton: text = "Left click here to show a context menu"; break; case ButtonSwitcher.LeftRightButton: text = "Left or right click here to show a context menu"; break; case ButtonSwitcher.RightButton: text = "Right click here to show a context menu"; break; } edit.Clear(); edit.Document.Blocks.Add(new Paragraph(new Run(text))); }