コード例 #1
0
ファイル: wySpriteEx.cpp プロジェクト: JMQCode/WiEngine
void wySpriteEx::setVisible(bool visible) {
    wyTextureNode::setVisible(visible);

    // must update vertices if use batch render, so need flag transform is dirty
    if(m_useBatchNode)
        setTransformDirty();
}
コード例 #2
0
ファイル: wyNode.cpp プロジェクト: nbolabs/WiEngine
void wyNode::setContentSize(float w, float h) {
    if(m_width != w || m_height != h) {
        m_width = w;
        m_height = h;
        m_anchorPointX = w * m_anchorX;
        m_anchorPointY = h * m_anchorY;
        setTransformDirty();
    }
}
コード例 #3
0
ファイル: wyNode.cpp プロジェクト: nbolabs/WiEngine
void wyNode::setPosition(float x, float y) {
    m_positionX = x;
    m_positionY = y;
    setTransformDirty();

    if(m_positionListener != NULL) {
        m_positionListener->onPositionChanged(this, m_plData);
    }
#if ANDROID
    else if(m_jPositionListener != NULL) {
        JNIEnv* env = getEnv();
        env->CallVoidMethod(m_jPositionListener, g_mid_IPositionListener_onPositionChanged, (jint)this);
    }
#endif
}
コード例 #4
0
ファイル: wyNode.cpp プロジェクト: nbolabs/WiEngine
void wyNode::setSkewY(float degree) {
    if(degree != m_skewY) {
        m_skewY = degree;
        setTransformDirty();
    }
}
コード例 #5
0
ファイル: wyNode.cpp プロジェクト: nbolabs/WiEngine
void wyNode::setScaleY(float scaleY) {
    if(scaleY != m_scaleY) {
        m_scaleY = scaleY;
        setTransformDirty();
    }
}
コード例 #6
0
ファイル: wyNode.cpp プロジェクト: nbolabs/WiEngine
void wyNode::setScaleX(float scaleX) {
    if(scaleX != m_scaleX) {
        m_scaleX = scaleX;
        setTransformDirty();
    }
}
コード例 #7
0
ファイル: wyNode.cpp プロジェクト: nbolabs/WiEngine
void wyNode::setScale(float scale) {
    if(scale != m_scaleX || scale != m_scaleY) {
        m_scaleX = m_scaleY = scale;
        setTransformDirty();
    }
}
コード例 #8
0
ファイル: wyNode.cpp プロジェクト: nbolabs/WiEngine
void wyNode::setRotation(float rot) {
    if(rot != m_rotation) {
        m_rotation = rot;
        setTransformDirty();
    }
}