Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 4
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCJumpBy.actionWithDuration(m_fDuration, CCPointExtension.ccp(-m_delta.x, -m_delta.y), m_height, m_nJumps));
 }
Ejemplo n.º 5
0
 public override CCFiniteTimeAction reverse()
 {
     return(CCMoveBy.actionWithDuration(m_fDuration, CCPointExtension.ccp(-m_delta.x, -m_delta.y)));
 }