Advertisement
PlinioJRM

WaveStrategy

Nov 1st, 2024 (edited)
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. using System;
  2. using PlinioJRM.Entities;
  3. using UnityEngine;
  4.  
  5. namespace PlinioJRM.Systems.Waves {
  6.     [CreateAssetMenu(fileName = "Wave Strategy", menuName = "Strategies/Wave")]
  7.     public class WaveStrategy : ScriptableObject {
  8.         public float spawnInterval;
  9.         public int   maxScorePerSpawn;
  10.         public bool  canSpawnGroups;
  11.         [Range(0, 100)]
  12.         public int groupChance;
  13.         [Range(0f, 1f)] // decreases the chance percentage of adding more to the group
  14.         public float groupChanceDecreaseFactor;
  15.         public float             minDistanceFromLastSpawn;
  16.         public EnemySpawnScore[] enemyScores;
  17.     }
  18.  
  19.     [Serializable]
  20.     public struct EnemySpawnScore {
  21.         public EnemyType Type;
  22.         public int       Score;
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement