// Use this for initialization void Start() { action = Director.getInstance().currentSceneControl as IUserAction; style = new GUIStyle(); style.fontSize = 25; sceneControl = (FirstSceneControl)Director.getInstance().currentSceneControl; }
protected void Start() { sceneControl = (FirstSceneControl)Director.getInstance().current; sceneControl.actionManager = this; flys.Add(CCFlyAction.getCCFlyAction()); base.flag = false; }
protected new void Start() { sceneController = (FirstSceneControl)SSDirector.getInstance().getCurrentSceneController(); sceneController.actionManager = this; this.speed = sceneController.speed; Debug.Log("speed=" + speed); }
// Use this for initialization protected void Start() { sceneController = (FirstSceneControl)Director.getInstance().currentSceneControl; diskFactory = sceneController.GetComponent <DiskFactory>(); scoreRecorder = sceneController.scoreRecorder; sceneController.actionManager = this;//设置动作管理器 }
public FirstSceneControl sceneControler; //引入场记 // Use this for initialization public override void Start() { enableEmit = true; enable = true; sceneControler = (FirstSceneControl)Director.getInstance().currentSceneControl; if (gameobject.GetComponent <Rigidbody>() == null) { gameobject.AddComponent <Rigidbody>(); } //startX = 6 - Random.value * 12; //this.transform.position = new Vector3(startX, 0, 0); //根据轮数设置力的大小 force = new Vector3(6 * Random.Range(-1, 1), 6 * Random.Range(0.5f, 2), 13 + 2 * sceneControler.currentRound); //force = new Vector3(1, 100, 100); }
private void OnGUI() { GUI.Label(new Rect(Screen.width / 2, 100, 400, 400), "Round:" + (FirstSceneControl.getCurrentRount() + 1).ToString(), style); if (Input.GetButtonDown("Fire1")) { Vector3 pos = Input.mousePosition; action.hit(pos); } GUI.Label(new Rect(1000, 0, 400, 400), "Score:" + action.GetScore().ToString(), style); if (isFirst && GUI.Button(new Rect(700, 100, 90, 90), "Start")) { isFirst = false; action.setGameState(GameState.ROUND_START); } if (!isFirst && action.getGameState() == GameState.ROUND_FINISH && GUI.Button(new Rect(700, 100, 90, 90), "Next Round")) { action.setGameState(GameState.ROUND_START); } }
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); } }
protected void Start() { sceneController = (FirstSceneControl)Director.getInstance().currentSceneControl; sceneController.actionManager = this; }
protected void Start() { sceneController = (FirstSceneControl)Director.getInstance().currentSceneControl; //sceneController.actionManager = this; Fly.Add(CCFlyAction.GetSSAction()); }
// Use this for initialization public override void Start() { firstSceneControl = (FirstSceneControl)Director.getInstance().currentSceneControl; }
protected new void Start() { sceneController = (FirstSceneControl)Director.getInstance().currentSceneControl; sceneController.actionManager = this; store.Add(UFOFlyAction.getSSAction()); }