Exemplo n.º 1
0
    private void OnAddCommand(Notification data)
    {
        FightCommandBase command = data.param as FightCommandBase;
        uint             frame   = command.Frame;

        if (!CommandDic.ContainsKey(frame))
        {
            CommandDic.Add(frame, new List <FightCommandBase>());
        }
        CommandDic[frame].Add(command);
    }
Exemplo n.º 2
0
    private void DoCommand(FightCommandBase command)
    {
        uint battleId = command.BattleId;

        if (_charaDic.ContainsKey(battleId))
        {
            ICharaBattle info = GetCharaById(battleId) as ICharaBattle;
            if (null == info)
            {
                return;
            }

            switch (command.CommandType)
            {
            case COMMAND_TYPE.MOVE:
                info.MoveCommand(command as MoveCommand);
                break;

            case COMMAND_TYPE.SKILL:
                info.SkillCommand(command as SkillCommand);
                break;
            }
        }
    }