// Start is called before the first frame update public static CCFlyAction2 GetSSAction(float speed) { CCFlyAction2 action = ScriptableObject.CreateInstance <CCFlyAction2>(); action.speed = speed; return(action); }
public override void fly(GameObject ufo, float speed) { CCFlyAction2 action = CCFlyAction2.GetSSAction(speed); this.RunAction(ufo, action, this); }