zoukankan      html  css  js  c++  java
  • cocos代码研究(2)Layer学习笔记

        auto layer = Layer::create();
    
        /*************华丽分割线*************/
    
        auto layer = LayerColor::create(Color4B(255, 0, 0, 255), 150, 150);
    
        /*************华丽分割线*************/
    
        auto layer = LayerGradient::create(Color4B(255, 0, 0, 255), Color4B(255, 255, 0, 255));
    
        /*************华丽分割线*************/
    
        auto layer = LayerGradient::create(Color4B(255, 0, 0, 255), Color4B(0, 255, 0, 255), Vec2(0.9f, 0.9f));

    Layer类 继承自 Node

    创建一个全屏黑色的图层
    static Layer * create()

    LayerColor类 继承自Layer

    创建一个全屏的黑色图层
    static LayerColor* create()

    通过颜色,宽度和高度来创建一个图层
    static LayerColor* create(const Color4B & color, GLfloat width, GLfloat height)

    LayerGradient类 继承自LayerColor

    创建一个全屏的黑色图层。
    static LayerGradient * create ()

    创建一个全屏的和在开始和结束颜色之间的梯度图层。
    static LayerGradient * create (const Color4B &start, const Color4B &end)

    在方向V上,使用开始颜色和结束颜色插值,创建一个全屏的带颜色梯度的图层。
    static LayerGradient * create (const Color4B &start, const Color4B &end, const Vec2 &v)

  • 相关阅读:
    Go 实现一个简单的TCP服务端
    将博客搬至CSDN
    My solution for Git Client Error: Permission denied (publickey)
    The Key to final data
    Design Pattern
    Difference between TCP and UDP
    Oracle SQL自带函数整理
    Java JDBC Batch
    Javascript Date 判断输入日期是否正确
    Javascript 数字保留2位小数
  • 原文地址:https://www.cnblogs.com/damowang/p/4844906.html
Copyright © 2011-2022 走看看