void Awake() { //weapon loadout _weapons = Resources.FindObjectsOfTypeAll <UnitWeapon>(); if (_weapons == null || _weapons.Length < 1) { Debug.LogWarning("WeaponMgr found no weapons!"); } _defaultMelee = DefaultMelee; _defaultRanged = DefaultRanged; //ammo depot pools Arrows = ArrowDepot; MagicMissiles = MagicMissileDepot; Lightning = LightningDepot; /* * AmmoDepot[] depots = GetComponents<AmmoDepot>(); * foreach (var d in depots) * { * switch (d.WhatAmmoType) * { * case "magicMissiles": * MagicMissiles = d; * continue; * default: * case "arrows": * Arrows = d; * continue; * } * }*/ }
void Awake() { Crosses = CrossDepot; Swirls = SwirlDepot; }