public override ExtendedEventArgs process() { ResponseEnterNameEventArgs args = new ResponseEnterNameEventArgs { user_id = user_id, name = name }; return(args); }
public void OnResponseEnterName(ExtendedEventArgs eventArgs) { ResponseEnterNameEventArgs args = eventArgs as ResponseEnterNameEventArgs; if (args.user_id != Constants.USER_ID) { opponentName.text = args.name; if (args.user_id == 1) { p1Name = args.name; } else { p2Name = args.name; } } }
public void OnResponseEnterName(ExtendedEventArgs eventArgs) { Debug.Log("Response Set Name"); Debug.Log(Constants.USER_ID); ResponseEnterNameEventArgs args = eventArgs as ResponseEnterNameEventArgs; Debug.Log(args.user_id); if (args.user_id != Constants.USER_ID) { if (args.user_id == 1) { displayName1.SetActive(true); displayName1.GetComponent <Text>().text = args.name; } else { displayName2.SetActive(true); displayName2.GetComponent <Text>().text = args.name; } } }