public override void EndDrag(CardFsm fsm) { var transform = fsm.transform; Server.LocalPlayer.GetComponent <CardController>().CmdCardParent(fsm.gameObject, _startParent, true); transform.position = _startPos; }
public override void Drag(CardFsm fsm) { var transform = fsm.transform; var mousePosition = new Vector3(Input.mousePosition.x, Input.mousePosition.y, 1); transform.position = mousePosition; }
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); }
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); } }
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); } }
public override void EndState(CardFsm fsm) { fsm.ChangeState(CreateInstance <BoardState>()); }
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) { }
public virtual void StartState(CardFsm fsm) { }
public virtual void EndDrag(CardFsm fsm) { }
public override void StartState(CardFsm fsm) { base.StartState(fsm); fsm.gameObject.layer = LayerMask.NameToLayer("CardBoard"); fsm.GetComponent <CardFlip>().Show(); }