// 초기화 private void Start() { player = GetComponent <PlayerCharacter>(); stick = GameObject.Find("JoyStickCanvas").GetComponentInChildren <JoyStick>(); keyboardInput = keyboard.nothing; touch = keyboard.nothing; }
private void DtxbDecollator_Click(object sender, EventArgs e) { keyboard keboard = new keyboard(datePage); keboard.Owner = this; keboard.StartPosition = FormStartPosition.CenterParent; keboard.ShowDialog(); DtxbDecollator.Text = inputResult; }
public InputManagerService(Game game) //Constructor : base(game) { GamePad = new gamePad(); Keyboard = new keyboard(); Mouse = new mouse(); ServiceHelper.Add <InputManagerService>(this); this.game = game; }
private void StxbName_Click(object sender, EventArgs e) { keyboard keboard = new keyboard(serialPage); keboard.Owner = this; keboard.StartPosition = FormStartPosition.CenterParent; keboard.ShowDialog(); StxbName.Text = inputResult; }
// 매 프레임 플레이어 입력을 감지 private void Update() { // 로컬 플레이어가 아닌 경우 입력을 받지 않음 if (!photonView.IsMine) { return; } // 로컬 플레이어가 죽은 상태에서는 입력을 받지 않음 if (player.dead) { horizontalMove = 0; verticalMove = 0; keyboardInput = keyboard.nothing; return; } // 움직임 입력 감지 if (stick.JoyVec != Vector3.zero) { horizontalMove = stick.JoyVec.x; verticalMove = stick.JoyVec.y; } else { horizontalMove = Input.GetAxis("Horizontal"); verticalMove = Input.GetAxis("Vertical"); } // 움직임 외 입력 감지 if (Input.GetKeyDown(KeyCode.Z) || touch == keyboard.attack) { keyboardInput = keyboard.attack; } else if (Input.GetKeyDown(KeyCode.X) || touch == keyboard.skill) { keyboardInput = keyboard.skill; } else if (Input.GetKeyDown(KeyCode.C) || touch == keyboard.heal) { keyboardInput = keyboard.heal; } else if (Input.GetKeyDown(KeyCode.V) || touch == keyboard.shield) { keyboardInput = keyboard.shield; } else if (Input.GetKeyDown(KeyCode.B) || touch == keyboard.potion) { keyboardInput = keyboard.potion; } else if (Input.GetKeyDown(KeyCode.Space) || touch == keyboard.avoid) { keyboardInput = keyboard.avoid; } else { keyboardInput = keyboard.nothing; } touch = keyboard.nothing; }
public override void OnInspectorGUI() { DrawDefaultInspector(); keyboard script = (keyboard)target; if (GUILayout.Button("Rebuild keyboard")) { script.create_keyboard(); } }
void Start() { if (keyboard.instance != null) { DestroyImmediate(this.gameObject); } keyboard.instance = this; this.create_keyboard(); }
public static void Main(string[] args) { //abstract class Console.WriteLine("ABSTRACT CLASS"); Kuliah kuliah; kuliah = new Dosen(); kuliah.materi(); kuliah.tugas(); Console.WriteLine(); kuliah = new Mahasiswa(); kuliah.materi(); kuliah.tugas(); Console.WriteLine(); Console.WriteLine(); //interface Console.WriteLine("INTERFACE"); IKomputer komputer; komputer = new monitor(); komputer.info(); komputer.fungsi(); Console.WriteLine(); komputer = new pc(); komputer.info(); komputer.fungsi(); Console.WriteLine(); komputer = new keyboard(); komputer.info(); komputer.fungsi(); }
public InputManagerService(Game game) //Constructor : base(game) { GamePad = new gamePad(); Keyboard = new keyboard(); Mouse = new mouse(); ServiceHelper.Add<InputManagerService>(this); this.game = game; }
public void HealButton() { touch = keyboard.heal; }
public void SkillButton() { touch = keyboard.skill; }
public void AttackButton() { touch = keyboard.attack; }
public void AvoidButton() { touch = keyboard.avoid; }
public void PotionButton() { touch = keyboard.potion; }
public void ShieldButton() { touch = keyboard.shield; }