Ejemplo n.º 1
0
 public Node(Classification classification, Direction dir, AttackUI ui)
 {
     this.classification = classification;
     this.children       = new ChoiceGroup();
     this.dir            = dir;
     this.ui             = ui;
 }
Ejemplo n.º 2
0
    AttackOrderTuple AttackOrderToTuple(AttackOrder order)
    {
        AttackUI ui = SimplePool.Spawn(attackUI).GetComponent <AttackUI>();

        ui.Source = this.transform;
        ui.Target = order.target.transform;
        return(new AttackOrderTuple(order, ui));
    }
Ejemplo n.º 3
0
    void Start()
    {
        foreach (Attack attack in attacks)
        {
            attack.canAttack = true;
            AttackUI attackUI = Instantiate(attackUITemplate, attackUITemplate.transform.parent);
            attack.UI = attackUI;
            attackUI.Setup(attack);
        }

        // turn off template
        attackUITemplate.gameObject.SetActive(false);
    }
Ejemplo n.º 4
0
 public Node(Classification classification, IActionType preAction, IActionType action, IActionType postAction,
             ChoiceGroup children, Direction dir, AttackUI ui)
 {
     this.classification = classification;
     this.preAction      = preAction;
     this.action         = action;
     this.postAction     = postAction;
     if (children != null)
     {
         this.children = children;
     }
     else
     {
         this.children = new ChoiceGroup();
     }
     this.dir = dir;
     this.ui  = ui;
 }
 public void Start()
 {
     attackUI = GameObject.FindObjectOfType <AttackUI>();
 }
Ejemplo n.º 6
0
 public AttackOrderTuple(AttackOrder order, AttackUI ui)
 {
     this.order = order;
     this.ui    = ui;
 }