DrawNode.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:cocos2d-java 作者:
final StructShapeCommand popShapeCommandCell() {
    if(currShapePos >= shapeCommandQueues.size) {
        return null;
    }

    stackCommand.clear();
    stackCommand.drawType = (DrawType) shapeCommandQueues.get(currShapePos++);
    stackCommand.color = (Color) shapeCommandQueues.get(currShapePos++);
    // 如果color是null则使用默认颜色
    if(stackCommand.color == null) {
        stackCommand.color = getDisplayedColor();
    }
    stackCommand.shapeType = (ShapeType) shapeCommandQueues.get(currShapePos++);
    stackCommand.borderWidth = (float) shapeCommandQueues.get(currShapePos++);
    int dataLen = (int) shapeCommandQueues.get(currShapePos++);
    for(int i = 0; i < dataLen; ++i) {
        stackCommand.vertexArray.add((Float) shapeCommandQueues.get(currShapePos++));
    }
    return stackCommand;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号