Skip to content

Instantly share code, notes, and snippets.

@DongguemYoo
Created April 24, 2020 01:46
Show Gist options
  • Save DongguemYoo/cb6b87b8e10a4df3c7a8be9386900876 to your computer and use it in GitHub Desktop.
Save DongguemYoo/cb6b87b8e10a4df3c7a8be9386900876 to your computer and use it in GitHub Desktop.
c# params
기존 코드
public delegate void CoilLineState(float num1,float num2);
public void OnCoilLineState(float num1,float num2)
{
EntryCoil.CoilLookAtOnShiftingLine(num1);
DeliveryCoil.CoilLookAtOnShiftingLine(num2);
}
params로 변경후
public delegate void CoilLineState(params float[] e);
public void OnCoilLineState(params float[] values)
{
EntryCoil.CoilLookAtOnShiftingLine(values[0]);
DeliveryCoil.CoilLookAtOnShiftingLine(values[1]);
}
사용 예제
OnCoilLineState(0,0);
MainCoilBegaviour.del_CoilLineState(0, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment