Exemple #1
0
 // 초기화
 private void Start()
 {
     player        = GetComponent <PlayerCharacter>();
     stick         = GameObject.Find("JoyStickCanvas").GetComponentInChildren <JoyStick>();
     keyboardInput = keyboard.nothing;
     touch         = keyboard.nothing;
 }
Exemple #2
0
        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;
        }
Exemple #3
0
 public InputManagerService(Game game) //Constructor
     : base(game)
 {
     GamePad  = new gamePad();
     Keyboard = new keyboard();
     Mouse    = new mouse();
     ServiceHelper.Add <InputManagerService>(this);
     this.game = game;
 }
Exemple #4
0
        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;
        }
Exemple #5
0
 // 매 프레임 플레이어 입력을 감지
 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;
 }
Exemple #6
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        keyboard script = (keyboard)target;

        if (GUILayout.Button("Rebuild keyboard"))
        {
            script.create_keyboard();
        }
    }
Exemple #7
0
    void Start()
    {
        if (keyboard.instance != null)
        {
            DestroyImmediate(this.gameObject);
        }

        keyboard.instance = this;

        this.create_keyboard();
    }
Exemple #8
0
    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; 
 } 
Exemple #10
0
 public void HealButton()
 {
     touch = keyboard.heal;
 }
Exemple #11
0
 public void SkillButton()
 {
     touch = keyboard.skill;
 }
Exemple #12
0
 public void AttackButton()
 {
     touch = keyboard.attack;
 }
Exemple #13
0
 public void AvoidButton()
 {
     touch = keyboard.avoid;
 }
Exemple #14
0
 public void PotionButton()
 {
     touch = keyboard.potion;
 }
Exemple #15
0
 public void ShieldButton()
 {
     touch = keyboard.shield;
 }