-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path왼가_s.cs
36 lines (28 loc) · 914 Bytes
/
왼가_s.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class 왼가_s : MonoBehaviour
{
public int speed;
void Start()
{
speed = 200;
}
void Update()
{
if (Input.GetKeyDown(KeyCode.S)) //누르는 동안 hold
{
// 단순히 위로 이동하는 것 ... 잘 작동됨 !
// transform.position += Vector3.up;
// 회전하는 것.... 잘 작동됨!
// transform.Rotate(Vector3.up * speed * Time.deltaTime);
transform.localScale += new Vector3(50,25,25);
}
if (Input.GetKeyUp(KeyCode.S)) //손 떼면 복구
{
// 회전하는 것.... 잘 작동됨!
// transform.Rotate(Vector3.down * speed * Time.deltaTime);
transform.localScale -= new Vector3(50,25,25);
}
}
}