// Use this for initialization void Start() { itemManager = GameObject.Find("ItemManager").GetComponent <ItemManager>(); startCall = gameObjectStartCall.GetComponent <StartCall>(); endCall = gameObjectEndCall.GetComponent <EndCall>(); effectCall = gameObjectEffectCall.GetComponent <EffectCall>(); audioSources = GetComponents <AudioSource>(); gameObjectStartCall.SetActive(true); }
private string EffectCallToString(EffectCall effectCall) { string source, target; if (effectCall.Caller == null) { source = "Глобальный эффект"; } else if (effectCall.CallerCard == null) { source = effectCall.Caller == player ? "Ваш глобальный эффект" : "Глобальный эффект противника"; } else { source = effectCall.Caller == player ? $"Эффект Вашей карты {CardToString(effectCall.CallerCard)}" : $"Эффект карты противника {CardToString(effectCall.CallerCard)}"; } target = effectCall.Target == player ? "Вас" : "противника"; return(String.Format("{0} действует на {1}", source, target)); }
public void DisplayEffect(EffectCall effect) { if (dispayedPlayedCard == false && opponent.Played != null) { if (opponent.Played.Hidden) { output.WriteLine("Противник разыгрывает ???!"); } else { output.WriteLine($"Противник разыгрывает {CardToStringDetailed(opponent.Played)}!"); } dispayedPlayedCard = true; } var effectString = EffectToString(effect.Effect); if (effectString != null) { output.WriteLine("{0}: {1}", EffectCallToString(effect), effectString); } }
public void DisplayEffect(EffectCall effect) { }