public bool InitWithTwoActions(IFiniteTimeAction action1, IFiniteTimeAction action2) { if (action1 == null || action2 == null) { this.LogError("initWithTwoActions action is null!!"); } bool ret = false; var d1 = action1.Duration; var d2 = action2.Duration; if (base.InitWithDuration(Math.Max(d1, d2))) { m_one = action1; m_two = action2; if (d1 > d2) { m_two = CCActionSequence.CreateWithTwoActions(action2, CCActionDelay.Create(d1 - d2)); } else if (d1 < d2) { m_one = CCActionSequence.CreateWithTwoActions(action1, CCActionDelay.Create(d2 - d1)); } ret = true; } return(ret); }
public static ActionInterval CCDelay(float duration) { return(CCActionDelay.Create(duration)); }