Пример #1
0
 private void AttachCharacters()
 {
     foreach (GameObject c in selectedCases)
     {
         TeamScript tS = null;
         if (teamNumber == 1)
         {
             tS = team1.GetComponent <TeamScript>();
         }
         if (teamNumber == 2)
         {
             tS = team2.GetComponent <TeamScript>();
         }
         Transform character = createCharacter.CreatePrefab((EnumMouvement.MouvementEnum)typeCharacter,
                                                            (EnumWeapon.WeaponEnum)typeWeapon,
                                                            tS);
         Debug.Log(c.transform.parent.localScale);
         character.localPosition = new Vector3(0, (float)0.6 + (c.transform.parent.GetChild(0).localScale.z *2), 0);
         character.SetParent(c.transform.parent, false);
         character.name = "Character";
         tS.characters.Add(character);
     }
 }