public void InstantiateWolf(Vector3 p_position) { Quaternion rotation = new Quaternion(0, 0, 0, 0); Script_Wolf myWolf = new Script_Wolf(p_position, _gameManager, this, rotation); _wolfList.Add(myWolf); }
public void DestroyWolf(Script_Wolf p_wolf, Material p_material) { GameObject wolfObject = p_wolf.GetWolfObject(); _wolfList.Remove(p_wolf); _gameManager.DestroyObject(wolfObject); _gameManager.DestroyMaterial(p_material); }
public void CreateWolves(GameObject p_tileObject, int p_width, int p_height, float p_yOffset, Quaternion p_rotation, int p_numberOfWolves) { int currentAmountOfWolves = 0; while (currentAmountOfWolves < p_numberOfWolves) { int x = Random.Range(0, p_width); int z = Random.Range(0, p_height); while (AccessGridTile(x, z).GetOccupiedBySheep() == true) { x = Random.Range(0, p_width); z = Random.Range(0, p_height); } Vector3 entityPosition = new Vector3(x, p_yOffset, z); Script_Wolf mySheep = new Script_Wolf(entityPosition, _gameManager, this, p_rotation); _wolfList.Add(mySheep); currentAmountOfWolves++; } }