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


C# Team.add_player方法代码示例

本文整理汇总了C#中Team.add_player方法的典型用法代码示例。如果您正苦于以下问题:C# Team.add_player方法的具体用法?C# Team.add_player怎么用?C# Team.add_player使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Team的用法示例。


在下文中一共展示了Team.add_player方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Validate_Creation

		public void Validate_Creation(string name)
        {
            string code_name = name.Replace(" ", "_");
            int r_alea = rand.Next(1000);
			Composition compo = Settings.Instance.Default_compo.First ().Value;
			Team t = new Team(name, compo, null, code_name + r_alea);
            for (int i = 0; i < t.Nb_Player; i++)
            {
				t.add_player(Settings.Instance.Random_Player);
            }
            Settings.Instance.AddOrUpdate_Team(t);
            
            chooseCompo_panel.SetActive(false);
            info_panel.SetActive(true);
            info_panel.GetComponent<TeamController>().Get_Teams_Array();
        }
开发者ID:CanPayU,项目名称:SuperSwungBall,代码行数:16,代码来源:MainController.cs

示例2: Settings

    public Settings()
    {
        this.version = VERSION;
        this.notificationState = NotificationState.All;
        this.soundState = SoundState.All;
        this.keyboard = new Dictionary<KeyboardAction, KeyCode>();
        this.paid_player = new Dictionary<string, Player>();
        this.secret_player = new Dictionary<string, Player>();
        this.challenge_player = new Dictionary<string, Player>();
        this.allowReplayBackup = true;
        this.selectedLanguage = AvailableLanguage.FR;

        // -- Setup Keyboard
        this.keyboard.Add(KeyboardAction.Passe, KeyCode.A);
        // --

        ResetDefaultPlayer();
        this.default_team = new Dictionary<string, Team>();
        this.default_compo = new Dictionary<string, Composition>();
        this.selected_stadium_name = "Stadium_0";


        // ----- Default Compo
        Composition compo_psg = new Composition("PSG", "psg");
        compo_psg.SetPosition(0, 0, 0);
        compo_psg.SetPosition(1, 1, 1);
        compo_psg.SetPosition(2, 2, 2);
        compo_psg.SetPosition(3, 3, 3);
        compo_psg.SetPosition(4, 5, 5);
        Default_compo.Add("psg", compo_psg);

        Composition compo_fr = new Composition("FRANCE", "fr");
        compo_fr.SetPosition(0, 3, 3);
        compo_fr.SetPosition(1, 1, 3);
        compo_fr.SetPosition(2, 2, 5);
        compo_fr.SetPosition(3, 1, 2);
        compo_fr.SetPosition(4, 5, 4);
        Default_compo.Add("fr", compo_fr);
        // -------------------

        // ----- Default Team FOR DEBUG
        string[] def_sound = new string[] { "Musics/Team/PSG/Allez", "Musics/Team/PSG/Clap" };
        Team psg = new Team("PSG", compo_psg, def_sound, "psg");

        psg.add_player(new Player(4, 6, 10, 4, "Lombrix", "D_00_lombrix"));
        psg.add_player(new Player(1, 4, 6, 10, "Itectori", "D_01_itectori"));
        psg.add_player(new Player(3, 2, 10, 7, "PlayWithCube", "D_02_pwc"));
        psg.add_player(new Player(7, 4, 4, 8, "GPasDNom", "D_03_gpasdnom"));

        //psg.add_player(new Player(4, 6, 10, 4, "Lombrix"));
        //psg.add_player(new Player(1, 4, 6, 10, "Itectori"));
        //psg.add_player(new Player(3, 2, 10, 7, "PlayWithCube"));
        //psg.add_player(new Player(7, 4, 4, 8, "GPasDNom"));

        psg.add_player(new Player(1, 1, 6, 8, "Epitechien"));
        default_team.Add("psg", psg);

        def_sound = new string[] { };
        Team fr = new Team("France", compo_fr, def_sound, "fr");

        fr.add_player(new Player(4, 6, 10, 4, "Lombrix", "D_00_lombrix"));
        fr.add_player(new Player(1, 4, 6, 10, "Itectori", "D_01_itectori"));
        fr.add_player(new Player(3, 2, 10, 7, "PlayWithCube", "D_02_pwc"));
        fr.add_player(new Player(7, 4, 4, 8, "GPasDNom", "D_03_gpasdnom"));

        //fr.add_player(new Player(4, 6, 10, 4, "Lombrix"));
        //fr.add_player(new Player(1, 4, 6, 10, "Itectori"));
        //fr.add_player(new Player(3, 2, 10, 7, "PlayWithCube"));
        //fr.add_player(new Player(7, 4, 4, 8, "GPasDNom"));

        fr.add_player(new Player(8, 7, 5, 7, "Epiteen"));
        default_team.Add("fr", fr);
        // ------------------
        selected_team = fr;
    }
开发者ID:CanPayU,项目名称:SuperSwungBall,代码行数:75,代码来源:Settings.cs


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