player ์ค‘์‹ฌ์œผ๋กœ ๋Œ๊ฒŒ ํ•˜๋ ค๊ณ  ํ•˜๊ณ  ์‹ถ์€๋ฐ, ๊ณต์ „์ฒด๊ฐ€ 1๊ฐœ ์ด๋ฉด ์ƒ๊ด€ ์—†๋Š”๋ฐ ๊ณต์ „์ฒด๊ฐ€ ๋Œ๊ณ  ์žˆ๋Š” ์ƒํ™ฉ์—์„œ 1๊ฐœ ๋” ์ถ”๊ฐ€๋˜๋ฉด ๊ณต์ „์ฒด ์‚ฌ์ด์˜ ๊ฐ„๊ฒฉ์ด ๋˜‘๊ฐ™์ด ์œ ์ง€๋˜๊ฒŒ ๋ฐ”๊พธ๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผํ• ๊นŒ? ์ด ๊ณต์ „์ฒด 4๊ฐœ๋กœ ๋งŒ๋“ค๊ณ  ์‹ถ์–ด!ย 

์•„๋ž˜ ์ฝ”๋“œ๋Š” ๋‚ด๊ฐ€ ์“ด ๊ณต์ „ ์ฝ”๋“œ ์ธ๋ฐ, ๋‹ค๋ฅธ ์Šคํฌ๋ฆฝํŠธ์—์„œ ๊ณต์ „์ฒด 1๊ฐœ์”ฉ ๋Š˜์–ด๋‚ ๋–„๋งˆ๋‹ค ๋งจ ๋ฐ‘ ํ•จ์ˆ˜ ํ˜ธ์ถœํ•ด์„œ ์œ„์น˜ ์กฐ์ • ํ•˜๋ ค๊ณ  ํ•ด! ๋ญ๊ฐ€ ์ž˜๋ชป ๋œ ๊ฑธ ๊นŒ?

public class EarthWeapon : MonoBehaviour { public float damage = 5f; public GameObject Player; public float speed; Vector3 offset; bool check = true; private void Start() { offset = transform.position - Player.transform.position; } private void Update() { if (check) { OrbitAround(); } } void OrbitAround() { transform.position = Player.transform.position + offset; transform.RotateAround(Player.transform.position, new Vector3(0,0,1), speed * Time.deltaTime); offset = transform.position - Player.transform.position; } public void setposition(int a) { check = false; if (a == 1) { transform.position = offset + new Vector3(1, 1, 0) + Player.transform.position; check = true; } if (a == 2) { transform.position = offset + new Vector3(-1, -1, 0) + Player.transform.position; check = true; } if (a == 3) { transform.position = offset + new Vector3(1, -1, 0) + Player.transform.position; check = true; } if (a == 4) { transform.position = offset + new Vector3(-1, 1, 0) + Player.transform.position; check = true; } } }