Created
April 24, 2020 01:46
-
-
Save DongguemYoo/cb6b87b8e10a4df3c7a8be9386900876 to your computer and use it in GitHub Desktop.
c# params
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
기존 코드 | |
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