Example #1
0
        private void updatePosition(Message message)
        {
            MovementPosition movementList = (MovementPosition)message;

            movementManager.updateStatePosition(
                new Vector3(movement[0].x, movement[0].y, movement[0].z),
                new Vector3(movement[1].x, movement[1].y, movement[1].z));
        }
    private MovementPosition GetRandomMovementPositionOfType(MovementPositionType _movementPositionType)
    {
        List <MovementPosition> possiblePositions = movementPositions.Where(x => x.movementPositionType == _movementPositionType && x.movementObj.transform.position != targetDestination).ToList();

        int randomPossiblePositionIndex = Random.Range(0, possiblePositions.Count);

        MovementPosition randomMovementPositionFound = possiblePositions[randomPossiblePositionIndex];

        return(randomMovementPositionFound);
    }