在cocos2d-x2.0版本中,用貝塞爾曲線來實現.
代碼如下:
運動的軌跡比較簡單,自己可以加多點節點,軌跡可以更復雜.
在cocos2d-x2.0版本中,用貝塞爾曲線來實現.
代碼如下:
運動的軌跡比較簡單,自己可以加多點節點,軌跡可以更復雜.
轉自:https://www.jianshu.com/p/99efda8dfec9 do{...}while(0)的妙用 IvanRunning 2018.05.07 16:38:26 字數
struct transformValues_ 擁有如下幾個參數 CCPoint pos; // position x and y 位置 CCPoint scale; // scale x and y