コード例 #1
0
ファイル: CCFadeIn.cs プロジェクト: lonag/cocos-u3d
        public override void update(float time)
        {
            ICCRGBAProtocol pRGBAProtocol = m_pTarget as ICCRGBAProtocol;

            if (pRGBAProtocol != null)
            {
                pRGBAProtocol.Opacity = (byte)(255 * time);
            }
        }
コード例 #2
0
ファイル: CCFadeIn.cs プロジェクト: chengcong/cocos2d-xna
        public override void update(float time)
        {
            ICCRGBAProtocol mPTarget = this.m_pTarget as ICCRGBAProtocol;

            if (mPTarget != null)
            {
                mPTarget.Opacity = (byte)(255f * time);
            }
        }
コード例 #3
0
ファイル: CCFadeTo.cs プロジェクト: liwq-net/liwq718
        public override void Update(float time)
        {
            ICCRGBAProtocol pRGBAProtocol = Target as ICCRGBAProtocol;

            if (pRGBAProtocol != null)
            {
                pRGBAProtocol.Opacity = (byte)(m_fromOpacity + (m_toOpacity - m_fromOpacity) * time);
            }
        }
コード例 #4
0
        public override void update(float dt)
        {
            ICCRGBAProtocol mPTarget = this.m_pTarget as ICCRGBAProtocol;

            if (mPTarget != null)
            {
                mPTarget.Color = new ccColor3B((byte)((float)this.m_from.r + (float)(this.m_to.r - this.m_from.r) * dt), (byte)((float)this.m_from.g + (float)(this.m_to.g - this.m_from.g) * dt), (byte)((float)this.m_from.b + (float)(this.m_to.b - this.m_from.b) * dt));
            }
        }
コード例 #5
0
ファイル: CCFadeTo.cs プロジェクト: chengcong/cocos2d-xna
        public override void update(float time)
        {
            ICCRGBAProtocol mPTarget = this.m_pTarget as ICCRGBAProtocol;

            if (mPTarget != null)
            {
                mPTarget.Opacity = (byte)((float)this.m_fromOpacity + (float)(this.m_toOpacity - this.m_fromOpacity) * time);
            }
        }
コード例 #6
0
ファイル: CCTintBy.cs プロジェクト: chengcong/cocos2d-xna
        public override void update(float dt)
        {
            ICCRGBAProtocol mPTarget = this.m_pTarget as ICCRGBAProtocol;

            if (mPTarget != null)
            {
                mPTarget.Color = new ccColor3B((byte)((float)this.m_fromR + (float)this.m_deltaR * dt), (byte)((float)this.m_fromG + (float)this.m_deltaG * dt), (byte)((float)this.m_fromB + (float)this.m_deltaB * dt));
            }
        }
コード例 #7
0
ファイル: CCTintTo.cs プロジェクト: lonag/cocos-u3d
        public override void startWithTarget(CCNode target)
        {
            base.startWithTarget(target);
            ICCRGBAProtocol protocol = m_pTarget as ICCRGBAProtocol;

            if (protocol != null)
            {
                m_from = protocol.Color;
            }
        }
コード例 #8
0
ファイル: CCFadeOut.cs プロジェクト: lonag/cocos-u3d
        public override void update(float time)
        {
            ICCRGBAProtocol pRGBAProtocol = m_pTarget as ICCRGBAProtocol;

            if (pRGBAProtocol != null)
            {
                pRGBAProtocol.Opacity = (byte)(255 * (1 - time));
            }
            /*m_pTarget->setOpacity(GLubyte(255 * (1 - time)));*/
        }
コード例 #9
0
        public override void startWithTarget(CCNode target)
        {
            base.startWithTarget(target);
            ICCRGBAProtocol mPTarget = this.m_pTarget as ICCRGBAProtocol;

            if (mPTarget != null)
            {
                this.m_from = mPTarget.Color;
            }
        }
コード例 #10
0
ファイル: CCFadeTo.cs プロジェクト: chengcong/cocos2d-xna
        public override void startWithTarget(CCNode pTarget)
        {
            base.startWithTarget(pTarget);
            ICCRGBAProtocol cCRGBAProtocol = pTarget as ICCRGBAProtocol;

            if (cCRGBAProtocol != null)
            {
                this.m_fromOpacity = cCRGBAProtocol.Opacity;
            }
        }
コード例 #11
0
ファイル: CCTintTo.cs プロジェクト: lonag/cocos-u3d
        public override void update(float dt)
        {
            ICCRGBAProtocol protocol = m_pTarget as ICCRGBAProtocol;

            if (protocol != null)
            {
                protocol.Color = new ccColor3B((byte)(m_from.r + (m_to.r - m_from.r) * dt),
                                               (byte)(m_from.g + (m_to.g - m_from.g) * dt),
                                               (byte)(m_from.b + (m_to.b - m_from.b) * dt));
            }
        }
コード例 #12
0
ファイル: CCFadeTo.cs プロジェクト: liwq-net/liwq718
        public override void StartWithTarget(Node pTarget)
        {
            base.StartWithTarget(pTarget);

            ICCRGBAProtocol pRGBAProtocol = pTarget as ICCRGBAProtocol;

            if (pRGBAProtocol != null)
            {
                m_fromOpacity = pRGBAProtocol.Opacity;
            }
        }
コード例 #13
0
        public override void Update(float dt)
        {
            ICCRGBAProtocol protocol = Target as ICCRGBAProtocol;

            if (protocol != null)
            {
                protocol.Color = new ccColor3B((byte)(m_fromR + m_deltaR * dt),
                                               (byte)(m_fromG + m_deltaG * dt),
                                               (byte)(m_fromB + m_deltaB * dt));
            }
        }
コード例 #14
0
ファイル: CCTintBy.cs プロジェクト: chengcong/cocos2d-xna
        public override void startWithTarget(CCNode target)
        {
            base.startWithTarget(target);
            ICCRGBAProtocol cCRGBAProtocol = target as ICCRGBAProtocol;

            if (cCRGBAProtocol != null)
            {
                ccColor3B color = cCRGBAProtocol.Color;
                this.m_fromR = color.r;
                this.m_fromG = color.g;
                this.m_fromB = color.b;
            }
        }
コード例 #15
0
        public override void StartWithTarget(Node target)
        {
            base.StartWithTarget(target);

            ICCRGBAProtocol protocol = target as ICCRGBAProtocol;

            if (protocol != null)
            {
                ccColor3B color = protocol.Color;
                m_fromR = color.r;
                m_fromG = color.g;
                m_fromB = color.b;
            }
        }