示例#1
0
        public override void EndDrag(CardFsm fsm)
        {
            var transform = fsm.transform;

            Server.LocalPlayer.GetComponent <CardController>().CmdCardParent(fsm.gameObject, _startParent, true);
            transform.position = _startPos;
        }
示例#2
0
        public override void Drag(CardFsm fsm)
        {
            var transform = fsm.transform;

            var mousePosition = new Vector3(Input.mousePosition.x, Input.mousePosition.y, 1);

            transform.position = mousePosition;
        }
示例#3
0
        public override void BeginDrag(CardFsm fsm)
        {
            var transform = fsm.transform;

            _startParent = transform.parent.gameObject;
            _startPos    = transform.position;
            Server.LocalPlayer.GetComponent <CardController>().CmdCardParent(fsm.gameObject, _canvas, true);
        }
示例#4
0
 public override void EndDrag(CardFsm fsm)
 {
     if (!isOverBoard)
     {
         base.EndDrag(fsm);
     }
     else
     {
         var cardController = Server.LocalPlayer.GetComponent <CardController>();
         cardController.CmdCardParent(fsm.gameObject, board, false);
         cardController.CmdEndState(fsm.gameObject);
     }
 }
示例#5
0
 public override void EndDrag(CardFsm fsm)
 {
     if (colliders.Count != 1)
     {
         base.EndDrag(fsm);
     }
     else
     {
         var enemy      = colliders[0];
         var controller = Server.LocalPlayer.GetComponent <CardController>();
         controller.CmdCardCollision(fsm.gameObject, enemy);
         base.EndDrag(fsm);
     }
 }
示例#6
0
 public override void EndState(CardFsm fsm)
 {
     fsm.ChangeState(CreateInstance <BoardState>());
 }
示例#7
0
 public override void StartState(CardFsm fsm)
 {
     base.StartState(fsm);
     fsm.gameObject.layer = LayerMask.NameToLayer("CardHand");
 }
 public virtual void BeginDrag(CardFsm fsm)
 {
 }
 public virtual void EndState(CardFsm fsm)
 {
 }
示例#10
0
 public virtual void StartState(CardFsm fsm)
 {
 }
示例#11
0
 public virtual void EndDrag(CardFsm fsm)
 {
 }
示例#12
0
 public override void StartState(CardFsm fsm)
 {
     base.StartState(fsm);
     fsm.gameObject.layer = LayerMask.NameToLayer("CardBoard");
     fsm.GetComponent <CardFlip>().Show();
 }