Beispiel #1
0
        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;
             *  }
             * }*/
        }
Beispiel #2
0
 void Awake()
 {
     Crosses = CrossDepot;
     Swirls  = SwirlDepot;
 }