public static void TestNonGenInterface_NonGenType() { I ic1 = new CC1(); // since CC1's method doesn't have newslot, in both cases we should get CC1's method // TEST1: test generic virtual method Eval((ic1.method2 <int>().ToString()).Equals("2")); Eval((ic1.method2 <string>().ToString()).Equals("2")); Eval((ic1.method2 <object>().ToString()).Equals("2")); Eval((ic1.method2 <A <int> >().ToString()).Equals("2")); Eval((ic1.method2 <S <object> >().ToString()).Equals("2")); }
public void UsePowerUp(CC1.Avail_PowerUps item) { switch(item) { case CC1.Avail_PowerUps.GreenShell: GreenShell(); break; case CC1.Avail_PowerUps.Oil: Oil(); break; case CC1.Avail_PowerUps.SpeedBoost: StartCoroutine (SpeedBoost()); break; case CC1.Avail_PowerUps.Invincible: StartCoroutine(Invincible()); break; } }
void Start() { ctrl = transform.parent.GetComponent <CC1>(); }
void Start() { ctrl = transform.parent.GetComponent<CC1>(); }