Пример #1
0
 public MinionPosition clone()
 {
     MinionPosition minPos = new MinionPosition();
     minPos.board = board;
     minPos.pathPosition = pathPosition.clone();
     return minPos;
 }
Пример #2
0
        public MinionPosition clone()
        {
            MinionPosition minPos = new MinionPosition();

            minPos.board        = board;
            minPos.pathPosition = pathPosition.clone();
            return(minPos);
        }
Пример #3
0
        public Vector3 getWorldPosition(MinionPosition minionPosition)
        {
            Board board = minionPosition.board;
            Vector3 point = getLocalPosition(minionPosition.pathPosition);
            float Deg2Rad = (float) (Math.PI/180.0f);
            float posX = (float) (point.x * Math.Cos(Deg2Rad * board.rotation.y*-1) - point.z * Math.Sin(Deg2Rad * board.rotation.y*-1));
            float posZ = (float) (point.x * Math.Sin(Deg2Rad * board.rotation.y*-1) + point.z * Math.Cos(Deg2Rad * board.rotation.y*-1));

            return new Vector3(posX, point.y, posZ) + board.position;
        }
Пример #4
0
        public Vector3 getWorldPosition(MinionPosition minionPosition)
        {
            Board board = minionPosition.board;
            Vector3 point = getLocalPosition(minionPosition.pathPosition);

            double angle = Deg2Rad*board.rotation.y*-1;
            float sin = (float) Math.Sin(angle);
            float cos = (float) Math.Cos(angle);
            float posX = point.x * cos - point.z * sin;
            float posZ = point.x * sin + point.z * cos;

            return new Vector3(posX, point.y, posZ) + board.position;
        }