本文整理汇总了C#中GameManager.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# GameManager.ToString方法的具体用法?C# GameManager.ToString怎么用?C# GameManager.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameManager
的用法示例。
在下文中一共展示了GameManager.ToString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateGameCharacterCard
public GameObject CreateGameCharacterCard(GameManager.GameSide side, Card cardData)
{
if (Global.Instance.scene == SceneType.GameScene)
{
//实例化卡牌
GameObject prefeb = Resources.Load<GameObject>("CharacterCard");
GameObject parent = GameObject.Find("GamePanel/" + side.ToString() + "side/CardGrid");
GameObject card = NGUITools.AddChild(parent, prefeb);
CardContainer container = card.GetComponent<CardContainer>();
container.SetCardData(cardData);//设置卡片属性
container.UpdateCardUI();//更新贴图
uiManager.AddCharacterUIListener(card, side);//添加UI事件监听
container.SetGameSide(side);//设置卡片归属方
parent.GetComponent<UIGrid>().Reposition();//更新卡片位置
return card;
}
else
{
LogsSystem.Instance.Print("不能在非游戏界面生成游戏卡牌", LogLevel.WARN);
return null;
}
}
示例2: AddNewSkillButton
void AddNewSkillButton(RectTransform ParentPanel, GameManager.skill skill, int _cost)
{
GameObject new_skill = (GameObject)Instantiate(New_Skill_button_prefab);
new_skill.transform.SetParent(ParentPanel, false);
new_skill.transform.localScale = new Vector3(1, 1, 1);
//new_skill.GetComponentInChildren<Text>().text = skill.ToString();
new_skill.GetComponent<SkillButton>().button_text.text = skill.ToString();
new_skill.GetComponent<SkillButton>().skill_to_do = new SkillData(skill, 1, 1);
new_skill.GetComponent<SkillButton>().cost = _cost;
current_new_Skills.Add(new_skill);
}
示例3: SummonCharacterUp
/// <summary>
/// 召唤选中的角色卡
/// </summary>
public void SummonCharacterUp(CharacterCard card, GameManager.GameSide side)
{
LogsSystem.Instance.Print(string.Format("{0}召唤{1}上场", side.ToString(), card.GetCardName()));
//召唤卡片到场上
string path = string.Format("UI Root/Background/GamePanel/{0}side/CardGrid", side.ToString());
GameObject parent = GameObject.Find(path);
GameObject prefab = Resources.Load<GameObject>("CharacterCard");
GameObject go = NGUITools.AddChild(parent, prefab);
CardContainer container = go.GetComponent<CardContainer>();
container.SetCardData(card, true);
parent.GetComponent<UIGrid>().Reposition();
}
示例4: PerformActivity
/// <summary>
/// Rewards due to completion of activity
/// </summary>
/// <param name="_activity"></param>
public bool PerformActivity(GameManager.Activity _activity)
{
ActivityData _data = new ActivityData();
foreach(ActivityData ad in GameManager.Instance.activityDefs)
{
if(ad.activityType == _activity)
{
_data = ad;
}
}
if(_data.cost > cash)
{
return false;
}
else
{
AddSatisfaction(_data.satisfactionBonus);
AddMotivation(_data.motivationBonus);
AddLuxury(_data.luxuryBonus);
AddDepression(-_data.depressionBonus);
AddCash(-_data.cost, _activity.ToString() + " cost");
if (_data != null)
{
foreach (SkillBonus sb in _data._skillBonus)
{
IncreaseSkill(sb.skillType, sb.proficiencyAdd);
}
}
return true;
}
}