Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EnemyTypes
- {
- private class TypeValues
- {
- public delegate void Func(Transform Entity);//just used for handing over values on initialization, somehow has to be public
- private string Name; //the Name of an EnemyType, NOT the name of a specific entity
- private float BaseSpeed; //actual speed of each enemy is randomly set within (BaseSpeed +/- SpeedTolerance) everytime it respawns
- private float SpeedTolerance;
- private Func Animate;
- public TypeValues(string Name, float BaseSpeed, float SpeedTolerance, Func Animate) //constructor apparently needs to be public too?
- {
- this.Name = Name;
- this.BaseSpeed = BaseSpeed;
- this.SpeedTolerance = SpeedTolerance;
- this.Animate = Animate;
- }
- }
- [SerializeField]
- private static Dictionary<int, TypeValues> Types = new Dictionary<int, TypeValues>
- {
- {1, new TypeValues("Standard", 1f, 0.5f, Entity => Entity.Rotate(new Vector3(0, 5, 0)))}
- };
- }
Add Comment
Please, Sign In to add comment