공부1 C# 파라미터와 int형으로 강제형변환 강제 형변환시 파라미터의 응용. 파라미터 이 친구가 있어서 참 고맙다 파라미터의 사용법은 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Test : MonoBehaviour { int intValue; float floatValue = 6.6f; float floatValue2 = 7.7f; void FloatToInt(float _parameter) //함수의 첫글자는 항상 대문자. //마자 함수 이용해주면 깔끔하게 1번만사용할 수 있어서! 조야용 //함수를 두개만들 수 있는데 그러면 매우 비효율 적이니까 { intValue = (int)_parameter; print(intValue).. 2021. 5. 11. 이전 1 다음