Exemple #1
0
        // this method downloads a command to the avatar
        // based on the available abilities
        public void useAbility(t_CartAbility ability)
        {
            CommandMsg msg = new CommandMsg();

            msg.robot        = t_Robot.t_Station;
            msg.Cmd          = RobotCmd.rc_ManualCommand;
            msg.ParamsLength = 1; // one byte - ability index
            msg.CmdParams    = new byte[msg.ParamsLength];
            msg.CmdParams[0] = (byte)ability;

            flagAbilityExecuting = true;
            flagAbilityDone      = false;

            this.sendCommandMessage(msg);
        }
        // this method downloads a command to the avatar
        // based on the available abilities
        public void useAbility(t_CartAbility ability)
        {
            CommandMsg msg = new CommandMsg();
            msg.robot = t_Robot.t_Station;
            msg.Cmd = RobotCmd.rc_ManualCommand;
            msg.ParamsLength = 1; // one byte - ability index
            msg.CmdParams = new byte[msg.ParamsLength];
            msg.CmdParams[0] = (byte)ability;

            flagAbilityExecuting = true;
            flagAbilityDone = false;

            this.sendCommandMessage(msg);
        }