// Adding Mouip to the planet by spawner building public void AddMouip(SpawnerBehaviour _spawnerData) { switch (_spawnerData.MouipToSpawn) { case (MOUIP_TYPE.BASIC): MouipBehaviour newMouip = Instantiate(gm.mouipBasic, transform); newMouip.EntityHeight = _spawnerData.EntityHeight; newMouip.SetEntityAngle = _spawnerData.GetEntityAngle; // newMouip.speed = 1.0f; newMouip.GetComponent <SpriteRenderer>().flipX = _spawnerData.GetComponent <SpriteRenderer>().flipX; entitiesList.Add(newMouip); break; } }
// Add specific Mouip to the planet on the segment target by the camera. public void AddMouip(MOUIP_TYPE _mouipType) { //GuiTextDebug.debug("Ajout d'un [" + entitiesList.Count + "] Mouip au jeu."); switch (_mouipType) { case (MOUIP_TYPE.BASIC): MouipBehaviour newMouip = Instantiate(gm.mouipBasic, transform); newMouip.EntityHeight = Random.Range(radiusLimitDown, radiusLimitHeigth); newMouip.SetEntityAngle = gm.ci.AngleDeVue; float tempRand = Random.Range(0, 2); newMouip.Sr.flipX = tempRand == 0 ? true : false; entitiesList.Add(newMouip); break; } }