void Start() { Application.targetFrameRate = 60; DontDestroyOnLoad(this.gameObject); Stage.Instantiate(5); Stage.inst.AddChild(new GRoot().displayObject); Stage.inst.camera.clearFlags = CameraClearFlags.Depth; Stage.inst.onKeyDown.Add(OnKeyDown); GRoot.inst.SetContentScaleFactor(1136, 640); UIPackage.AddPackage("UI/JoystickDemo"); _mainView = UIPackage.CreateObject("Demo", "Main").asCom; _mainView.SetSize(GRoot.inst.width, GRoot.inst.height); _mainView.AddRelation(GRoot.inst, RelationType.Size); GRoot.inst.AddChild(_mainView); _joystick = new JoystickModule(_mainView); _joystick.onMove.Add(__joystickMove); _joystick.onEnd.Add(__joystickEnd); _npc = GameObject.Find("npc").transform; }
public override void InitComponnet() { _moveStickView = mView.GetChild("moveStick").asCom; _movestick = new JoystickModule(_moveStickView); _aimStickView = mView.GetChild("aimStick").asCom; _aimstick = new AimstickModule(_aimStickView); }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); _mainView = this.GetComponent <UIPanel>().ui; //_text = _mainView.GetChild("n4").asTextField; _joystick = new JoystickModule(_mainView); _joystick.onMove.Add(__joystickMove); _joystick.onEnd.Add(__joystickEnd); }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); _mainView = this.GetComponent<UIPanel>().ui; _text = _mainView.GetChild("n9").asTextField; _joystick = new JoystickModule(_mainView); _joystick.onMove.Add(__joystickMove); _joystick.onEnd.Add(__joystickEnd); }
public JoystickScene() { UIPackage.AddPackage("UI/Joystick"); _mainView = UIPackage.CreateObject("Joystick", "Main").asCom; _mainView.MakeFullScreen(); _mainView.AddRelation(GRoot.inst, RelationType.Size); AddChild(_mainView); _text = _mainView.GetChild("n9").asTextField; _joystick = new JoystickModule(_mainView); _joystick.onMove.Add(__joystickMove); _joystick.onEnd.Add(__joystickEnd); }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); //GRoot.inst.SetContentScaleFactor(1136, 640); _mainView = this.GetComponent <UIPanel>().ui; _text = _mainView.GetChild("n9").asTextField; if (!is_show_text) { GTextField text = _mainView.GetChild("n8").asTextField; text.visible = false; _text.visible = false; } _joystick = new JoystickModule(_mainView); _joystick.onMove.Add(__joystickMove); _joystick.onEnd.Add(__joystickEnd); }
void Start() { Application.targetFrameRate = 60; GRoot.inst.SetContentScaleFactor(1136, 640); Stage.inst.onKeyDown.Add(OnKeyDown); UIPackage.AddPackage("UI/Joystick"); _mainView = UIPackage.CreateObject("Joystick", "Main").asCom; _mainView.fairyBatching = true; _mainView.SetSize(GRoot.inst.width, GRoot.inst.height); _mainView.AddRelation(GRoot.inst, RelationType.Size); GRoot.inst.AddChild(_mainView); _text = _mainView.GetChild("n9").asTextField; _joystick = new JoystickModule(_mainView); _joystick.onMove.Add(__joystickMove); _joystick.onEnd.Add(__joystickEnd); }