public void ExecuteSaveOrLoad() //경고팝업 계속 클릭 { alertPop_Save.SetActive(false); alertPop_Load.SetActive(false); switch (tempNum) { case "01": //testSL.CallSave(1); WriteInform(1); theSL.CallSave(1); //Debug.Log(tempNum+"번에 저장"); break; case "02": WriteInform(2); theSL.CallSave(2); //Debug.Log(tempNum+"번에 저장"); break; case "03": WriteInform(3); theSL.CallSave(3); //Debug.Log(tempNum+"번에 저장"); break; case "11": StartLoad(1); break; case "12": StartLoad(2); break; case "13": StartLoad(3); break; } tempNum = ""; }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.F5)) { //저장 theSaveNLoad.CallSave(); } if (Input.GetKeyDown(KeyCode.F9)) { //로드 theSaveNLoad.CallLoad(); } if (canMove && !notMove && !attacking) { if (Input.GetAxisRaw("Horizontal") != 0 || Input.GetAxisRaw("Vertical") != 0) { canMove = false; StartCoroutine(MoveCoroutine()); } } if (!notMove && !attacking) { if (Input.GetKeyDown(KeyCode.Space)) { currentAttackDelay = attackDelay; attacking = true; animator.SetBool("Attacking", true); } } if (attacking) { currentAttackDelay -= Time.deltaTime; if (currentAttackDelay <= 0) { animator.SetBool("Attacking", false); attacking = false; } } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.F5)) { theSaveNLoad.CallSave(); } if (Input.GetKeyDown(KeyCode.F7)) { theSaveNLoad.CallLoad(); } if (canMove && !notMove) { if (Input.GetAxisRaw("Horizontal") != 0 || Input.GetAxisRaw("Vertical") != 0) { canMove = false; StartCoroutine(MoveCoroutine()); } } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.F5)) { theSaveNLoad.CallSave(); } if (Input.GetKeyDown(KeyCode.F7)) { theSaveNLoad.CallLoad(); } //if (canMove == true) //{ // //Input.GetAxisRaw("Horizontal") : 우 방향키가 눌리면 1, 좌 방향키가 눌리면 -1 리턴 // //Input.GetAxisRaw("Vertical") : 상 방향키가 눌리면 1, 하 방향키가 눌리면 -1 리턴 // if (Input.GetAxisRaw("Horizontal") != 0 || Input.GetAxisRaw("Vertical") != 0) // { // canMove = false; // StartCoroutine(MoveCoroutine()); // } //} }
public void Save() { saveNload.CallSave(); //저장 }
void Update() { currentSceneName = SceneManager.GetActiveScene().name; if (Input.GetKeyDown(KeyCode.F5)) { theSaveNLoad.CallSave(); } if (Input.GetKeyDown(KeyCode.F9)) { theSaveNLoad.CallLoad(); } if (!attacking && playerMove) { if (true) { float h = Input.GetAxisRaw("Horizontal"); float v = Input.GetAxisRaw("Vertical"); walking = true; if (h > 0) { directionX = 1; directionY = 0; } else if (h < 0) { directionX = -1; directionY = 0; } else if (v > 0) { directionX = 0; directionY = 1; } else if (v < 0) { directionX = 0; directionY = -1; } else { walking = false; } if (walking) { transform.Translate(new Vector3(directionX, directionY, 0) * Time.deltaTime * speed); pc.enabled = false; } if (Input.GetMouseButton(0) || Input.GetKeyDown(KeyCode.Space)) { attackTimeCounter = attackTime; attacking = true; animator.SetBool("Hit", true); pc.enabled = true; } animator.SetFloat("DirectionX", directionX); animator.SetFloat("DirectionY", directionY); animator.SetBool("Walking", walking); } } if (attackTimeCounter > 0) { attackTimeCounter -= Time.deltaTime; } if (attackTimeCounter <= 0) { attacking = false; animator.SetBool("Hit", false); } }