コード例 #1
0
 public override void update(float dt)
 {
     if (m_pTarget != null)
     {
         m_pTarget.position = CCPointExtension.ccp(m_startPosition.x + m_delta.x * dt,
                                                   m_startPosition.y + m_delta.y * dt);
     }
 }
コード例 #2
0
 public override void update(float dt)
 {
     if (m_pTarget != null)
     {
         // Is % equal to fmodf()???
         float frac = (dt * m_nJumps) % 1.0f;
         float y    = m_height * 4 * frac * (1 - frac);
         y += m_delta.y * dt;
         float x = m_delta.x * dt;
         m_pTarget.position = CCPointExtension.ccp(m_startPosition.x + x, m_startPosition.y + y);
     }
 }
コード例 #3
0
 public override void startWithTarget(CCNode target)
 {
     base.startWithTarget(target);
     m_delta = CCPointExtension.ccp(m_delta.x - m_startPosition.x, m_delta.y - m_startPosition.y);
 }
コード例 #4
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCJumpBy.actionWithDuration(m_fDuration, CCPointExtension.ccp(-m_delta.x, -m_delta.y), m_height, m_nJumps));
 }
コード例 #5
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCMoveBy.actionWithDuration(m_fDuration, CCPointExtension.ccp(-m_delta.x, -m_delta.y)));
 }