예제 #1
0
 void setAgents()
 {
     
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerMovement>();
     GameObject[] foesList = GameObject.FindGameObjectsWithTag("Foe");
     foes = new GhostMovement[foeNumber];
     for (int i = 0; i < foeNumber; i++)
     {
         foes[i] = foesList[i].GetComponent<GhostMovement>();
     }
     key = GameObject.FindGameObjectWithTag("Key").GetComponent<Key>();
 }
예제 #2
0
 public static bool KeyDown(Key key)
 {
     return(keysDown.Contains(key));
 }
예제 #3
0
 public bool IsKeyDown(Key key)
 {
     return keyStates[(int)key];
 }
예제 #4
0
 public static bool KeyRelease(Key key)
 {
     return(!keysDown.Contains(key) && keysDownLast.Contains(key));
 }
예제 #5
0
 public static bool KeyPress(Key key)
 {
     return(keysDown.Contains(key) && !keysDownLast.Contains(key));
 }
예제 #6
0
파일: Input.cs 프로젝트: AyyTee/Aventyr
 public bool KeyDown(Key input)
 {
     return KeyCurrent.IsKeyDown(input) && Focus;
 }
예제 #7
0
파일: Input.cs 프로젝트: AyyTee/Aventyr
 public bool KeyRelease(Key input)
 {
     return !KeyCurrent.IsKeyDown(input) &&
         KeyPrevious.IsKeyDown(input) &&
         Focus;
 }
예제 #8
0
파일: Input.cs 프로젝트: AyyTee/Aventyr
 public bool KeyPress(Key input)
 {
     return KeyCurrent.IsKeyDown(input) &&
         !KeyPrevious.IsKeyDown(input) &&
         Focus;
 }