Beispiel #1
0
        // Start is called before the first frame update
        void Start()
        {
            m_inventoryDisplay = InventoryDisplay.s_instance;

            // Reset building yields, transfer initial to current.
            for (int j = 0; j < BuildingTypeCount; j++)
            {
                m_buildingYields[j] = new InternalBYP();
                m_buildingYields[j].m_buildingType = (BuildingTypes)j;
                {
                    for (int i = 0; i < ResourceTypeCount; i++)
                    {
                        m_buildingYields[j].m_deltas[i] = 0;
                    }
                }
            }

            foreach (var variable in m_initialBuildingYields)
            {
                foreach (var resProf in variable.m_deltas)
                {
                    m_buildingYields[(int)variable.m_type].m_deltas[(int)resProf.m_type] = resProf.m_delta;
                }
            }
        }
Beispiel #2
0
 void Awake()
 {
     if (s_instance == null)
     {
         s_instance = this;
     }
     else
     {
         return;
     }
 }
Beispiel #3
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            InventoryDisplay myScript = (InventoryDisplay)target;

            if (GUILayout.Button("Set Values"))
            {
                myScript.SetDisplayValues();
            }
        }