Esempio n. 1
0
 protected override void RenderContent(UnityEngine.Object undoRecordObject)
 {
     RotateAroundX.RenderEditorGUI(undoRecordObject);
     RotateAroundY.RenderEditorGUI(undoRecordObject);
     RotateAroundZ.RenderEditorGUI(undoRecordObject);
     SetRotationToIdentity.RenderEditorGUI(undoRecordObject);
 }
Esempio n. 2
0
    public List <GameObject> SpawnFood()
    {
        List <GameObject> food = new List <GameObject>();

        for (int x = 0; x < Mathf.Sqrt(xmax); x++)
        {
            for (int z = 0; z < Mathf.Sqrt(ymax); z++)
            {
                GameObject    foodClone  = GameObject.Instantiate(bacteriaFoodPrefab, new Vector3(x * spacing, Random.Range(-ySpacing, ySpacing), -z * spacing), Quaternion.identity);
                RotateAroundY foodRotate = foodClone.GetComponentInChildren <RotateAroundY>();
                foodRotate.transform.rotation = Random.rotation;
                food.Add(foodClone);
            }
        }
        return(food);
    }