Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using WhateverYouWantButPreferablyTheUnityStuff
- ...
- // a set of all available weapons that you can borrow from a static class or something
- private GameObject weaponList = someClassToStoreAListOfWeapons.weapons;
- // number of weapons you wanna have
- public int wCount = 5;
- void Start() { // or whatever function the devs normally call before match starts
- Stack weaponStack = new Stack();
- for (int i = 0; i < wCount; i+=1) {
- weaponStack.push(weaponList[Random.Range(0, weaponList.length - 1)]);
- }
- }
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement