Ejemplo n.º 1
0
 public void Receive(TargetSelected message)
 {
     if (message.Target == Card)
     {
         IsSelected = true;
     }
 }
Ejemplo n.º 2
0
    void OnTouchDown()
    {
        TargetSelected targetSelected = new TargetSelected();

        targetSelected.Type = ResourceType.Terrain;
        //targetSelected.SelectedPoint=mou
    }
Ejemplo n.º 3
0
        private void OnTargetSelected(TargetSelected e)
        {
            if (e.Target == null)
            {
                Attack(null);
                return;
            }

            var attackable = e.Target.GetComponent <Attackable>();

            if (attackable == null)
            {
                return;
            }

            Attack(attackable);
        }
Ejemplo n.º 4
0
        private void OnTargetSelected(TargetSelected e)
        {
            if (e.Target == CurrentTarget)
            {
                return;
            }

            var target = CurrentTarget;

            if (CurrentTarget != null)
            {
                CurrentTarget = null;
                target.Deselect();
            }

            CurrentTarget = e.Target;
        }
Ejemplo n.º 5
0
    public void SetTarget(TargetSelected target)
    {
        m_PlayerBehaviour.TargetSelected = target;
        switch (target.Type)
        {
        case ResourceType.Monster:
            m_PlayerBehaviour.TargetType     = target.Type;
            m_PlayerBehaviour.WalkToPosition = target.Target.position;
            break;

        case ResourceType.Portal:
            m_PlayerBehaviour.TargetType     = target.Type;
            m_PlayerBehaviour.WalkToPosition = target.Target.position;
            break;

        case ResourceType.NPC:
            m_PlayerBehaviour.TargetType     = target.Type;
            m_PlayerBehaviour.WalkToPosition = target.Target.position;
            break;
        }
    }
 private void OnTargetSelected(TargetSelected e)
 {
     CurrentTarget = e.Target;
     SetFilter(new CurrentTargetAbilityFilter(e.Target));
 }