本文整理汇总了C++中CCNode::getSkewY方法的典型用法代码示例。如果您正苦于以下问题:C++ CCNode::getSkewY方法的具体用法?C++ CCNode::getSkewY怎么用?C++ CCNode::getSkewY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCNode
的用法示例。
在下文中一共展示了CCNode::getSkewY方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: visit
void CCBClippingNode::visit(){
CCNode* hock = this->getChildByTag(htag);
if (hock==NULL) {
getStencil()->setPosition(0, 0);
getStencil()->setScaleX(1);
getStencil()->setScaleY(1);
getStencil()->setRotationX(0);
getStencil()->setRotationY(0);
getStencil()->setSkewX(0);
getStencil()->setSkewY(0);
getStencil()->setAnchorPoint(ccp(0.5, 0.5));
}else{
getStencil()->setPosition(hock->getPositionX(),hock->getPositionY());
getStencil()->setScaleX(hock->getScaleX());
getStencil()->setScaleY(hock->getScaleY());
getStencil()->setRotationX(hock->getRotationX());
getStencil()->setRotationY(hock->getRotationY());
getStencil()->setSkewX(hock->getSkewX());
getStencil()->setSkewY(hock->getSkewY());
getStencil()->setAnchorPoint(hock->getAnchorPoint());
}
CCClippingNode::visit();
}
示例2: showFrame
void CCINode::showFrame(){
//std::vector<CCIMovieTag *> tags = this->swfMovie->getTags();
while (true) {
CCIMovieTag * tag = NULL;
if (currentTag<tags.size()) {
tag = tags[currentTag++];
}else{
this->removeAllChildrenWithCleanup(true);
//this->stop();
currentTag = 0;
currentFrame = 0;
break;
}
if(tag->getTagType()==TagTypePlaceObject||tag->getTagType()==TagTypePlaceObject2||tag->getTagType()==TagTypePlaceObject3){
CCIPlaceObject * placeTag = (CCIPlaceObject *)tag;
int charactorId = placeTag->getCharacterId();
int depth = placeTag->getDepth();
CCIPlaceObject2 * placeTag2 = NULL;
if (tag->getTagType()==TagTypePlaceObject2||tag->getTagType()==TagTypePlaceObject3) {
placeTag2 = (CCIPlaceObject2 *)tag;
}
CCNode * node;
if (!placeTag2||placeTag2->placeType==PlaceObjectTypeNew) {
//place1 or placetag2 new
node = (CCNode *)this->nodes->objectForKey(charactorId);
if (node&&node->getParent()==NULL) {
this->addChild(node, depth, depth);
CCInteger * nodeType = (CCInteger *)node->getUserObject();
if (nodeType->getValue()==NodeTypeCCINode) {
CCINode * ccinode = (CCINode *)node;
ccinode->play();
}
}
}else if(placeTag2&&placeTag2->placeType==PlaceObjectTypeModify){
node = (CCNode *)this->getChildByTag(depth);
}else if(placeTag2&&placeTag2->placeType==PlaceObjectTypeReplace){
CCNode * newNode = (CCNode *)this->nodes->objectForKey(charactorId);
node = (CCNode *)this->getChildByTag(depth);
if (node) {
if (newNode) {
//get last transform matrix
newNode->setPosition(node->getPosition());
newNode->setScaleX(node->getScaleX());
newNode->setScaleY(node->getScaleY());
newNode->setSkewX(node->getSkewX());
newNode->setSkewY(node->getSkewY());
}
CCInteger * nodeType = (CCInteger *)node->getUserObject();
if (nodeType->getValue()==NodeTypeCCINode) {
CCINode * ccinode = (CCINode *)node;
ccinode->stop();
}
node->removeFromParentAndCleanup(true);
}
node = newNode;
if (node&&node->getParent()==NULL) {
this->addChild(node, depth, depth);
CCInteger * nodeType = (CCInteger *)node->getUserObject();
if (nodeType->getValue()==NodeTypeCCINode) {
CCINode * ccinode = (CCINode *)node;
ccinode->play();
}
}
}
if (node) {
CCIMatrix * matrix = placeTag->getMatrix();
if (matrix) {
int x = matrix->getTranslateX();
int y = matrix->getTranslateY();
node->setPosition(this->swfMovie->getHeader()->getBounds()->convertToCCSpace(x, y));
//restore
float scaleX = 1.0;
float scaleY = 1.0;
node->setScaleX(1);
node->setScaleY(1);
node->setSkewX(0);
node->setSkewY(0);
if (matrix->HasScale) {
scaleX = matrix->getScaleX();
scaleY = matrix->getScaleY();
node->setScaleX(scaleX);
node->setScaleY(scaleY);
}
if (matrix->HasRotate) {
float skewX = matrix->getSkewX();
float skewY = matrix->getSkewY();
//.........这里部分代码省略.........