Exemplo n.º 1
0
 private void StartSpawningLog()
 {
     _logSpawner.SpawnLog();
     _logSpawner.SpawnKnifeOnLog(UnityEngine.Random.Range(gameProperies.minNumOfStartKnives,
                                                          gameProperies.maxNumOfStartKnives + 1));
     if (UnityEngine.Random.Range(0f, 1f) < gameProperies.chanceOfAppleAppearing)
     {
         _logSpawner.SpawnAppleOnLog();
     }
 }
Exemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        LogSpawner spawner = (LogSpawner)target;

        if (GUILayout.Button("Spawn Log"))
        {
            spawner.SpawnLog();
        }
    }