Beispiel #1
0
        /// <summary>
        /// 用卡
        /// </summary>
        /// <param name="args"></param>
        void UseCard(UseCardEventArgs args)
        {
            UberDebug.LogDebugChannel("Frontend", $"玩家{args.PlayerID}使用卡牌{args.CardRID},{args}");
            int position = -1;

            int[] target = new int[0];
            if (args is UseCardWithPositionArgs)
            {
                position = (args as UseCardWithPositionArgs).Position;
            }
            else if (args is UseCardWithTargetArgs)
            {
                var arg = args as UseCardWithTargetArgs;
                target = arg.TargetCardRuntimeID;
            }
            else if (args is UseCardWithTargetPositionArgs)
            {
                var arg = args as UseCardWithTargetPositionArgs;
                position = arg.Position;
                target   = arg.TargetCardRuntimeID;
            }
            //gm.Game.use(args.PlayerID, args.CardRID, position, target);
        }
Beispiel #2
0
 public void UseCard(int playerID, int cardRuntimeID, UseCardEventArgs args)
 {
     args.PlayerID = playerID;
     args.CardRID  = cardRuntimeID;
     UseCard(args);
 }