Exemplo n.º 1
0
        //[Test]
        public void TestAddGroup()
        {
            mTeam = BnyxTeam.GetSingleton();
            TeamEntity player = new TeamEntity();

            player.GameObj       = new GameObject("Player");
            player.Ids           = player.GetEntityId();
            player.Type          = GroupType.PLAYER;
            player.Valid         = true;
            player.Weight        = -1;
            player.WeightPercent = 1f;

            mTeam.AddNewPlayer(player);

            PlayerGroup playerGroup = new PlayerGroup();

            playerGroup.Name = "冲锋小队";
            mTeam.AddNewPlayerGroup(playerGroup);
            mTeam.AddNewPlayer(player, false, 1);
            //mTeam.AddNewPlayer(player, false, 1);

            TeamEntity enemy = new TeamEntity();

            enemy.GameObj       = new GameObject("Enemy");
            enemy.Ids           = enemy.GetEntityId();
            enemy.Type          = GroupType.ENEMY;
            enemy.Valid         = true;
            enemy.Weight        = -1;
            enemy.WeightPercent = 1f;
            mTeam.AddNewEnemy(enemy);
            // mTeam.AddNewEnemy(enemy);
        }
Exemplo n.º 2
0
 public static BnyxTeam GetSingleton()
 {
     if (_singleton == null)
     {
         lock (_lock)
         {
             _singleton = new BnyxTeam();
         }
     }
     return(_singleton);
 }
Exemplo n.º 3
0
 public TargetDecorator()
 {
     mTeam = BnyxTeam.GetSingleton();
 }