void Update() { for (int i = 0; i < PlayerNum; i++) { InputPad.InputDownData(ref input[i], i + 1); if (i == 0) { if (!setComplete) { SetPlayer1(); } continue; } else { if (psw[i].activFlg) { continue; } if (input[i].menu) { psw[i].state = PlayerSelectWindow.STATUS.INIT; psw[i].activFlg = true; cursorHoldObj[i] = Instantiate(cursorObj[i]); cursorHoldObj[i].transform.parent = windowManagerObj.transform; cursorManger[i] = cursorHoldObj[i].GetComponent <CursorManager>(); cursorManger[i].obj = psw[i].gameObject; if (selectIcon.s_selectNo[i] == 2) { npcButton[i - 1].state = NPCButton.STATUS.NOTURN; } } } } }
public void Awake() { _doCtrl = new controller.DoController(); _modelBoard = new model.SquareBoard(); _viewBoard = CreateSquareBoard(); _inputPad = CreateInputPad(); _situationBoard = CreateSituationBoard(); }
void Start() { trans.localPosition = transform.parent.transform.position; window = obj.GetComponent <PlayerSelectWindow>(); trans.localPosition = DEFALTPOS[PlayerNum - 1]; input = new InputData(); InputPad.InputData(ref input, PlayerNum); }
public void Remove(InputPad pad) { if (_inputPadList.Count > 0) { _inputPadList.Remove(pad); if (_inputPadList.Count > 0) { _inputPadList[_inputPadList.Count - 1].IsEnable = true; } } }
public InputPad CreateInputPad() { InputPad pad = new InputPad(); if (_inputPadList.Count > 0) { var prev = _inputPadList[_inputPadList.Count - 1]; prev.IsEnable = false; } _inputPadList.Add(pad); return(pad); }
void Update() { for (int i = 0; i < PlayerNum; i++) { InputPad.InputDownData(ref input[i], i + 1); if (input[i].menu) { SoundManager.obj.PlaySE(1); act(); } } }
void Update() { trans.position += (Vector3)input.axis * speed; AccelCheck(); BreakeCheck(); Control(); DestroyIcon(); InputPad.InputDownData(ref input, PlayerNum); input.axis = InputPad.Axis(PlayerNum); window.ID = icon.selectNo; PostionLimit(); }
void Start() { PlayerNum = 4; SetAllArray(); NPCNum(); for (int i = 0; i < PlayerNum; i++) { input[i] = new InputData(); InputPad.InputData(ref input[i], i + 1); windowObj[i] = transform.GetChild(i).gameObject; psw[i] = windowObj[i].GetComponent <PlayerSelectWindow>(); } }
public static void InputDownData(ref InputData outData, int aNum = 1) { if (outData == null) { outData = new InputData(); } outData.axis = Vector2.zero; outData.accel = InputPad.AccelDown(aNum); outData.brake = InputPad.BrakeDown(aNum); outData.glide = InputPad.GlideDown(aNum); outData.drift = InputPad.DriftDown(aNum); outData.menu = InputPad.MenuDown(aNum); }
// プレイヤー指定 --------------------------------------------------------- public static void InputData(ref InputData outData, int aNum = 1) { if (outData == null) { outData = new InputData(); } outData.axis = InputPad.Axis(aNum); outData.accel = InputPad.Accel(aNum); outData.brake = InputPad.Brake(aNum); outData.glide = InputPad.Glide(aNum); outData.drift = InputPad.Drift(aNum); outData.menu = InputPad.Menu(aNum); }
public static void InputAllDownData(ref InputData outData) { if (outData == null) { outData = new InputData(); } outData.axis = Vector2.zero; outData.accel = InputPad.AllAccelDown(); outData.brake = InputPad.AllBrakeDown(); outData.glide = InputPad.AllGlideDown(); outData.drift = InputPad.AllDriftDown(); outData.menu = InputPad.AllMenuDown(); }
//データを入力する============================================================================= // 全て ------------------------------------------------------------------- public static void InputAllData(ref InputData outData) { if (outData == null) { outData = new InputData(); } outData.axis = InputPad.AllAxis(); outData.accel = InputPad.AllAccel(); outData.brake = InputPad.AllBrake(); outData.glide = InputPad.AllGlide(); outData.drift = InputPad.AllDrift(); outData.menu = InputPad.AllMenu(); }
void Start() { if (Application.loadedLevel == SceneName.Title.ToInt()) { act = transform.root.GetComponent <SceneLoadManager>().NextScene; } PlayerNum = 4; SoundManager.obj.PlayBGM(3, true); for (int i = 0; i < PlayerNum; i++) { input[i] = new InputData(); InputPad.InputData(ref input[i], i + 1); } }
/** * 通常のプレイ用インスタンスを作成 */ public static Tetris CreateGamePlay() { Tetris tetris; Tetrimino tetrimino = new Tetrimino(); int min_index = 0; int max_index = tetrimino.getTypeMax(); Generator generator = new Generator(min_index, max_index); InputBase input = new InputPad(); //落下ブロックは内部で固定でも良いのでは? //生成クラスでの範囲指定に、落下ブロックの情報が必要だから中で生成すると厳しい //ひとまずは外に出しておく //ファクトリで作成するので外部からは呼ぶだけだし tetris = new Tetris(BOARD_SIZE_W, BOARD_SIZE_H, tetrimino, generator, input); return(tetris); }
//入力受け取り============================================================= private void InputFixdUpdate() { //特殊処理 if (m_fnInputSpecialFunc != null) { m_fnInputSpecialFunc(ref m_Input, ref m_InputDown); return; } if (m_fInputLock) { return; } #if PC_DEBUG InputPad.InputAllData(ref m_Input); InputPad.InputAllDownData(ref m_InputDown); #else InputPad.InputData(ref m_Input, m_plyNo); InputPad.InputDownData(ref m_InputDown, m_plyNo); #endif }
void Start() { if (Application.loadedLevel == SceneName.Title.ToInt()) { act = transform.root.GetComponent <SceneLoadManager>().NextScene; } SoundManager.obj.PlayBGM(2, true); decIcons = 0; length = transform.childCount; childObj = new GameObject[length]; for (int i = 0; i < length; i++) { childObj[i] = transform.GetChild(i).gameObject; if (childObj[i] == null) { continue; } if (iconCount == null) { iconCount = childObj[i].GetComponent <IconCount>(); } if (childObj[i].tag != decTexture) { continue; } decImage = childObj[i].GetComponent <Image>(); decTrans = decImage.rectTransform; decTrans.localScale = Vector2.zero; } playMax = 0; PlayerNum = 4; input = new InputData[PlayerNum]; for (int i = 0; i < PlayerNum; i++) { input[i] = new InputData(); InputPad.InputData(ref input[i], i + 1); } }
void Update() { Debug.Log(input[0].menu); playMax = iconCount.length; decIcons = iconCount.setNum; if (decIcons != playMax) { decTrans.localScale = Vector2.zero; } else if (decIcons == playMax) { decTrans.localScale = Vector2.one; for (int i = 0; i < PlayerNum; i++) { InputPad.InputDownData(ref input[i], i + 1); if (input[i].menu) { SoundManager.obj.PlaySE(1); act(); } } } }
protected override void Awake() { base.Awake(); gameObject.name = "InputManager"; defaultPad = CreateInputPad(); }
public void Reset() { inputpad = GetComponentInParent <InputPad>(); }
// Start is called before the first frame update void Start() { inputManager = InputManager.Instance(); inputPad = inputManager.CreateInputPad(); CustomEventSystem.Instance().Enter(buttons[0].gameObject); }