Exemple #1
0
    public void AddChild(Transform child, SmartButton sb = null)
    {
        BT temp = new BT();

        temp.child_transform = child;
        temp.child           = sb;

        childs.Add(temp);
    }
 public void SetToButton(SmartButton SetToButton)
 {
     if (ManagingButtons.Contains(SetToButton))
     {
         foreach (SmartButton button in ManagingButtons)
         {
             if (button != SetToButton)
             {
                 button.HoverExitButton();
             }
         }
         SetToButton.HoverOverButton();
     }
 }
 public static Node PressButton(SmartCharacter user, SmartButton button)
 {
     return new LeafAffordance("Press", user, button);
 }
 public static Node CoerceIntoPressingButtonAtCounter(
     SmartCharacter coercer,
     SmartCharacter target,
     SmartButton button,
     SmartBankCounter counter)
 {
     return new Sequence(
         StandInFrontOfCounter(coercer, counter),
         BeginCoerce(coercer, target),
         new LeafWait(2000),
         LeaveCounter(target, counter),
         new LeafWait(1000),
         PressButton(target, button),
         EndCoerce(coercer));
 }
 public static Node CoerceIntoPressingButton(
     SmartCharacter coercer, 
     SmartCharacter target, 
     SmartButton button)
 {
     return new Sequence(
         ApproachUpTo(coercer, target, 3.0f),
         BeginCoerce(coercer, target),
         new LeafWait(3000),
         PressButton(target, button),
         EndCoerce(coercer));
 }