public void Fire()

{

float a = Random.Range(-1.0f, 1.0f);

float b = Random.Range(-1.0f, 1.0f);

GameObject temp = Instantiate(mortarshell, muzzle.remove_style_tag;"> mortarshellList.Add(temp);

for(int i=0;i<mortarshellList.Count;i++)

{

mortarshell _mortarshell = mortarshellList[i].GetComponent<mortarshell>();

_mortarshell.start = muzzle;

_mortarshell.end = mortarRange;

}

}


---------------------------------------------------------------------------------------------


ย public void Fire()

ย  ย  {ย  ย  ย  ย ย 

ย  ย  ย  ย  float a = Random.Range(-1.0f, 1.0f);

ย  ย  ย  ย  float b = Random.Range(-1.0f, 1.0f);

ย  ย  ย  ย  GameObject temp = Instantiate(mortarshell, muzzle.position, Quaternion.identity);

ย  ย  ย  ย  mortarshellList.Add(temp);

ย  ย  ย  ย  for(int i=0;i<mortarshellList.Count;i++)

ย  ย  ย  ย  {

ย  ย  ย  ย  ย  ย mortarshell _mortarshell = mortarshellList[i].GetComponent<mortarshell>();

ย  ย  ย  ย  ย  ย  _mortarshell.start = muzzle.transform.position;

ย  ย  ย  ย  ย  ย  _mortarshell.end = mortarRange.transform.position + new Vector3(a,b,0);ย 

ย  ย  ย  ย  }ย  ย ย 

ย  ย  }


๋ฐ‘์— ์งˆ๋ฌธ๊ธ€ ์˜ฌ๋ฆฌ๋‹ˆ๊นŒย _mortarshell.start๋ž‘ย _mortarshell.end ์ด๊ฑธ ํŠธ๋žœ์Šคํผ์—์„œ ๋ฒกํ„ฐ3์œผ๋กœ ๋ฐ”๊ฟ”์„œ ํ•˜๋ผ๊ณ  ํ•ด์„œ ๋ฐ”๊พธ๊ธด ํ–ˆ๋Š”๋ฐ

์•ˆ๋ฐ”๊พธ๊ณ  ์ˆ˜์ •ํ•œ๋‹ค๋ฉด ์–ด๋–ป๊ฒŒ ์งœ์•ผํ•จ?