当前位置: 首页>>代码示例>>C#>>正文


C# GameManager.ToString方法代码示例

本文整理汇总了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;
        }
    }
开发者ID:zhutaorun,项目名称:ACGCard-for-Unity3D,代码行数:25,代码来源:GameScene.cs

示例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);
 }
开发者ID:PsychedelicHeaven,项目名称:ZCaprioAndOzkar,代码行数:11,代码来源:UIManager.cs

示例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();
    }
开发者ID:zhutaorun,项目名称:ACGCard-for-Unity3D,代码行数:16,代码来源:GameScene.cs

示例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;
     }
 }
开发者ID:PsychedelicHeaven,项目名称:ZCaprioAndOzkar,代码行数:35,代码来源:Actor.cs


注:本文中的GameManager.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。