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