当前位置: 首页>>代码示例>>C#>>正文


C# com.getParent方法代码示例

本文整理汇总了C#中com.getParent方法的典型用法代码示例。如果您正苦于以下问题:C# com.getParent方法的具体用法?C# com.getParent怎么用?C# com.getParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com的用法示例。


在下文中一共展示了com.getParent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: tweenBone

        private void tweenBone(com.brashmonkey.spriter.objects.SpriterBone currentBone, com.brashmonkey.spriter.objects.SpriterBone
			 nextBone, int i, long startTime, long endTime)
        {
            currentBone.copyValuesTo(this.tempBones[i]);
            this.tempBones[i].setTimeline((nextBone != null) ? currentBone.getTimeline() : -1
                );
            com.brashmonkey.spriter.objects.SpriterAbstractObject parent = (this.tempBones[i]
                .hasParent()) ? this.tempBones[this.tempBones[i].getParentId()] : this.tempParent;
            if (nextBone != null)
            {
                if (parent != this.tempParent)
                {
                    if (!currentBone.getParent().equals(nextBone.getParent()))
                    {
                        nextBone = (com.brashmonkey.spriter.objects.SpriterBone)this.getTimelineObject(currentBone
                            , this.tempBones2);
                        com.brashmonkey.spriter.SpriterCalculator.reTranslateRelative(parent, nextBone);
                        nextBone.setAngle(nextBone.getAngle() * this.flippedX * this.flippedY);
                    }
                }
                else
                {
                    if (nextBone.hasParent())
                    {
                        nextBone = (com.brashmonkey.spriter.objects.SpriterBone)this.getTimelineObject(currentBone
                            , this.tempBones2);
                        com.brashmonkey.spriter.SpriterCalculator.reTranslateRelative(parent, nextBone);
                        nextBone.setAngle(nextBone.getAngle() * this.flippedX * this.flippedY);
                    }
                }
                if (this.tempBones[i].tween)
                {
                    this.interpolateAbstractObject(this.tempBones[i], currentBone, nextBone, startTime
                        , endTime);
                }
            }
            this.moddedBones[currentBone.getId()].modSpriterBone(this.tempBones[i]);
            if (this.transitionFixed)
            {
                this.tempBones[i].copyValuesTo(this.lastFrame.getBones()[i]);
            }
            else
            {
                this.tempBones[i].copyValuesTo(this.lastTempFrame.getBones()[i]);
            }
            if (!this.tempBones[i].hasParent() || !this.moddedBones[currentBone.getId()].isActive
                ())
            {
                this.tempBones[i].setX(this.tempBones[i].getX() + this.pivotX);
                this.tempBones[i].setY(this.tempBones[i].getY() + this.pivotY);
            }
            this.translateRelative(this.tempBones[i], parent);
        }
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:53,代码来源:SpriterAbstractPlayer.cs

示例2: updateBone

        protected internal override void updateBone(com.brashmonkey.spriter.objects.SpriterBone
			 bone)
        {
            base.updateBone(bone);
            bone.copyValuesTo(temp);
            com.brashmonkey.spriter.objects.SpriterAbstractObject parent = (bone.hasParent())
                 ? getRuntimeBones()[bone.getParent().getId()] : this.tempParent;
            com.brashmonkey.spriter.SpriterCalculator.reTranslateRelative(parent, temp);
            temp.copyValuesTo(this.lastFrame.getBones()[temp.getId()]);
        }
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:10,代码来源:SpriterPlayerIK.cs

示例3: tweenObject

        private void tweenObject(com.brashmonkey.spriter.objects.SpriterObject currentObject
			, com.brashmonkey.spriter.objects.SpriterObject nextObject, int i, long startTime
			, long endTime)
        {
            com.brashmonkey.spriter.draw.DrawInstruction dI = this.instructions[i];
            currentObject.copyValuesTo(this.tempObjects[i]);
            com.brashmonkey.spriter.objects.SpriterAbstractObject parent = null;
            if (!currentObject.isTransientObject())
            {
                this.tempObjects[i].setTimeline((nextObject != null) ? currentObject.getTimeline(
                    ) : -1);
                parent = (currentObject.hasParent()) ? this.tempBones[currentObject.getParentId()
                    ] : this.tempParent;
                if (nextObject != null)
                {
                    if (parent != this.tempParent)
                    {
                        if (!currentObject.getParent().equals(nextObject.getParent()))
                        {
                            nextObject = (com.brashmonkey.spriter.objects.SpriterObject)this.getTimelineObject
                                (currentObject, this.tempObjects2);
                            com.brashmonkey.spriter.SpriterCalculator.reTranslateRelative(parent, nextObject);
                            nextObject.setAngle(nextObject.getAngle() * this.flippedX * this.flippedY);
                        }
                    }
                    else
                    {
                        if (nextObject.hasParent())
                        {
                            nextObject = (com.brashmonkey.spriter.objects.SpriterObject)this.getTimelineObject
                                (currentObject, this.tempObjects2);
                            com.brashmonkey.spriter.SpriterCalculator.reTranslateRelative(parent, nextObject);
                            nextObject.setAngle(nextObject.getAngle() * this.flippedX * this.flippedY);
                        }
                    }
                    if (this.tempObjects[i].tween)
                    {
                        this.interpolateSpriterObject(this.tempObjects[i], currentObject, nextObject, startTime
                            , endTime);
                    }
                }
                this.moddedObjects[currentObject.getId()].modSpriterObject(this.tempObjects[i]);
                if (this.transitionFixed)
                {
                    this.tempObjects[i].copyValuesTo(this.lastFrame.getObjects()[i]);
                }
                else
                {
                    this.tempObjects[i].copyValuesTo(this.lastTempFrame.getObjects()[i]);
                }
            }
            else
            {
                parent = this.tempParent;
            }
            if (!this.tempObjects[i].hasParent())
            {
                this.tempObjects[i].setX(this.tempObjects[i].getX() + this.pivotX);
                this.tempObjects[i].setY(this.tempObjects[i].getY() + this.pivotY);
            }
            this.translateRelative(this.tempObjects[i], parent);
            if (this.moddedObjects[currentObject.getId()].getRef() != null)
            {
                this.tempObjects[i].setRef(this.moddedObjects[currentObject.getId()].getRef());
            }
            /*if (this.moddedObjects[currentObject.getId()].getLoader() != null)
            {
                this.tempObjects[i].setLoader(this.moddedObjects[currentObject.getId()].getLoader
                    ());
            }*/
            this.tempObjects[i].copyValuesTo(dI);
            this.setInstructionRef(dI, this.tempObjects[i], nextObject);
        }
开发者ID:Trixt0r,项目名称:SpriterXNATest,代码行数:73,代码来源:SpriterAbstractPlayer.cs


注:本文中的com.getParent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。