public void PutNew(string name1, string asset, bool talk, float posx, float posy, float size = 1f) { if (talk) { other = otherCharac.GetComponent <OtherChar> (); other.name = name1; other.Size = size; other.Image = asset; other.PosX = posx; other.PosY = posy; other.Solid = false; other.Put(); objects = GameObject.FindGameObjectsWithTag("Other"); } else { itm = item.GetComponent <Items> (); itm.name = name1; itm.Image = asset; itm.Size = size; itm.PosX = posx; itm.PosY = posy; itm.IsVisible = true; itm.Put(); } }
void PutCharacters() { string[] names = { "Maria", "Camilo", "Nicky", "Ronaldo", "Felipe" }; string[] assets = { "chica-2", //0 "Camilo", //1 "bravucon-bully-mosntruo", //2 "bravucon-1-monstruo", //3 "bravucon-2-mosntruo", }; float[] positionsX = { -3f, -1f, 1.5f, 3.5f, 5.5f }; //float[] positionsY = {-2.9f, -2.9f, -2.9f, -2.9f, -2.9f}; other = otherCharac.GetComponent <OtherChar> (); for (int i = 0, k = names.Length; i < k; i++) { other.name = names[i]; if (i == 1) { other.Size = 0.8f; } else { other.Size = 0.5f; } other.Image = assets[i]; other.PosX = positionsX[i]; //other.PosY = positionsY[i]; other.PosY = -2.9f; other.Solid = false; other.Put(); } }
void PutCharacters() { string[] names = { "Maria", "Camilo", "Nicky", "Ronaldo", "Felipe", "Profesor", "Chepe", "Laura" }; string[] assets = { "chica-2", //0 "Camilo", //1 "bravucon-bully-mosntruo", //2 "bravucon-1-monstruo", //3 "bravucon-2-mosntruo", //4 "profesor2", //5 "chico-2", //6 "chica-1" //8 }; float[] positions = { -50f, -52f, -33f, -30.5f, -29f, 4.5f, 19.3f, 32.2f }; other = otherCharac.GetComponent <OtherChar> (); for (int i = 0, k = names.Length; i < k; i++) { other.name = names[i]; if (i == 1 || i == 5 || i == 6 || i == 7) { other.Size = 0.8f; } else { other.Size = 0.5f; } other.Image = assets[i]; other.PosX = positions[i]; other.PosY = -2.6f; other.Solid = false; other.Put(); } }
void PutCharacters() { string[] names = { "Laura", "Camilo", "Maria", "Adan", "Señora", "Chepe", "Nicky", "Ronaldo", "Felipe" }; string[] assets = { "chica-1", //0 "Camilo", //1 "chica-2", //2 "perso_adulto", //3 "vecina", //5 "chico-2", //6 "bravucon-bully-mosntruo", //7 "bravucon-2-mosntruo", //8 "bravucon-1-monstruo" //9 }; float[] positions = { -64.5f, -60.5f, -66f, -48f, -16.5f, -62.5f, 40f, 42f, 44f }; other = otherCharac.GetComponent <OtherChar> (); for (int i = 0, k = names.Length; i < k; i++) { other.name = names[i]; if (i == 0 || i == 1 || i == 4 || i == 5) { other.Size = 0.8f; } else { other.Size = 0.5f; } other.Image = assets[i]; other.PosX = positions[i]; other.PosY = -2.6f; other.Solid = false; other.Put(); objects.Add(GameObject.Find(names[i] + "(Clone)")); } }