protected new void Start() { float speed = 5f; sceneController = (FirstSceneControl)Director.getInstance().currentSceneControl; sceneController.actionManager = this; moveToLeft = CCMoveToAction.GetSSAction(sceneController.Boat_Left, speed); moveToRight = CCMoveToAction.GetSSAction(sceneController.Boat_Right, speed); foreach (KeyValuePair <int, GameObject> obj in sceneController.On_Shore_r) { on_off[obj.Key] = CCOn_OffAction.GetSSAction(); } this.RunAction(sceneController.boat, moveToLeft, this); this.RunAction(sceneController.boat, moveToRight, this); foreach (KeyValuePair <int, GameObject> obj in sceneController.On_Shore_r) { this.RunAction(obj.Value, on_off[obj.Key], this); } }
public static CCOn_OffAction GetSSAction() { CCOn_OffAction action = ScriptableObject.CreateInstance <CCOn_OffAction>(); return(action); }