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(); }
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(); } }
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 }
void wyNode::setSkewY(float degree) { if(degree != m_skewY) { m_skewY = degree; setTransformDirty(); } }
void wyNode::setScaleY(float scaleY) { if(scaleY != m_scaleY) { m_scaleY = scaleY; setTransformDirty(); } }
void wyNode::setScaleX(float scaleX) { if(scaleX != m_scaleX) { m_scaleX = scaleX; setTransformDirty(); } }
void wyNode::setScale(float scale) { if(scale != m_scaleX || scale != m_scaleY) { m_scaleX = m_scaleY = scale; setTransformDirty(); } }
void wyNode::setRotation(float rot) { if(rot != m_rotation) { m_rotation = rot; setTransformDirty(); } }