Package gwlpr.mapshard.models.enums

Examples of gwlpr.mapshard.models.enums.MovementType


                action.getPositionVector(),
                (int) action.getPositionPlane());

        Vector2 direction = action.getMoveDirection();

        MovementType moveType = MovementType.fromInt((int)action.getMovementType());
       
        // this should not be done directly:
        pos.position = position;
        dir.direction = direction;
       
View Full Code Here


    public static void sendChangeDirection(Channel channel, Entity entity)
    {
        // retrieve the entity related data we need...
        int agentID = entity.get(AgentIdentifiers.class).agentID;
        Vector2 dir = entity.get(Direction.class).direction;
        MovementType movT = entity.get(Movement.class).moveType;
       
        // construct the message
        P026_AgentMoveDirection moveDir = new P026_AgentMoveDirection();
        moveDir.init(channel);
        moveDir.setAgentID(agentID);
        moveDir.setDirection(dir);
        moveDir.setMovementType(movT.getVal());

        channel.writeAndFlush(moveDir);
    }
View Full Code Here

        // retrieve the entity related data we need...
        int agentID = entity.get(AgentIdentifiers.class).agentID;
        Movement move = entity.get(Movement.class);
        WorldPosition curPos = entity.get(Position.class).position;
        WorldPosition moveTo = move.moveAim;
        MovementType movT = move.moveType;
       
        // send the messages
        P032_SpeedModifier speedMod = new P032_SpeedModifier();
        speedMod.init(channel);
        speedMod.setAgentID(agentID);
        speedMod.setModifier(movT.getSpeedModifier());
        speedMod.setMovementType(movT.getVal());

        channel.writeAndFlush(speedMod);

        // TODO check me: this is probably the place that the player would reach within
        // the next time step.
View Full Code Here

TOP

Related Classes of gwlpr.mapshard.models.enums.MovementType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.