예제 #1
0
 internal override void SetSIDEObject(Object returned)
 {
     if (returned is WeaponObject)
     {
         UNIT.weapon.prefabSlot = returned as WeaponObject;
     }
     else
     {
         CurrentFabrikat       = returned;
         CurrentFabrikatNumber = Fabrikat.IndexOf(CurrentFabrikat);
         UnitState             = EnumProvider.ORDERSLIST.Produce;
     }
 }
예제 #2
0
    internal override Object[] GetUnitsSIDEMenuObjects()
    {
        if (UNIT.weapon.HasArsenal)
        {
            Object[] objBuffer = new Object[Fabrikat.Count + UNIT.weapon.arsenal.Count];
            int      index     = 0;

            // Add buildable Buildings
            foreach (Object fabrikat in Fabrikat)
            {
                objBuffer[index++] = fabrikat;
            }

            // Add Weapon Arsenal
            for (int i = 0; i < UNIT.weapon.arsenal.Count; i++)
            {
                objBuffer[index + i] = UNIT.weapon.arsenal[i];
            }

            return(objBuffer);
        }
        return(Fabrikat.ToArray());
    }