Beispiel #1
0
        /// <summary>
        /// Fills the ore list.
        /// </summary>
        private void FillOreList()
        {
            foreach (KeyValuePair <string, Ore> pair in OreList.DictOre)
            {
                comboBoxOre.Items.Add(pair.Value);
            }

            //Select ore from config
            Ore ore = OreList.Get(Config <Settings> .Instance.SelectedOre);

            if (ore != null)
            {
                for (int n = 0; n < comboBoxOre.Items.Count; n++)
                {
                    if (comboBoxOre.Items[n] == ore)
                    {
                        comboBoxOre.SelectedIndex = n;
                    }
                }
            }
            else
            {
                comboBoxOre.SelectedIndex = 0;
            }
        }
Beispiel #2
0
    public static OreList createOreDatabase()
    {
        asset = ScriptableObject.CreateInstance <OreList>();

        AssetDatabase.CreateAsset(asset, "Assets/Resources/Databases/OreDatabase.asset");
        AssetDatabase.SaveAssets();
        return(asset);
    }
        /// <summary>
        /// Initializes a new instance of the <see cref="CalculatorForm"/> class.
        /// </summary>
        public CalculatorForm()
        {
            InitializeComponent();
            comboStandTax.SelectedIndex = Config <Settings> .Instance.StandTaxe;


            pictureBoxTritanium.Tag   = MineralList.Get("Tritanium");
            textBoxPriceTritanium.Tag = MineralList.Get("Tritanium");
            pictureBoxPyerite.Tag     = MineralList.Get("Pyerite");
            textBoxPricePyerite.Tag   = MineralList.Get("Pyerite");
            pictureBoxMexallon.Tag    = MineralList.Get("Mexallon");
            textBoxPriceMexallon.Tag  = MineralList.Get("Mexallon");
            pictureBoxIsogen.Tag      = MineralList.Get("Isogen");
            textBoxPriceIsogen.Tag    = MineralList.Get("Isogen");
            pictureBoxNocxium.Tag     = MineralList.Get("Nocxium");
            textBoxPriceNocxium.Tag   = MineralList.Get("Nocxium");
            pictureBoxZydrine.Tag     = MineralList.Get("Zydrine");
            textBoxPriceZydrine.Tag   = MineralList.Get("Zydrine");
            pictureBoxMegacyte.Tag    = MineralList.Get("Megacyte");
            textBoxPriceMegacyte.Tag  = MineralList.Get("Megacyte");
            pictureBoxMorphite.Tag    = MineralList.Get("Morphite");
            textBoxPriceMorphite.Tag  = MineralList.Get("Morphite");

            pictureBoxVeldspar.Tag    = OreList.Get("Veldspar");
            pictureBoxScordite.Tag    = OreList.Get("Scordite");
            pictureBoxPyroxeres.Tag   = OreList.Get("Pyroxeres");
            pictureBoxPlagioclase.Tag = OreList.Get("Plagioclase");
            pictureBoxOmber.Tag       = OreList.Get("Omber");
            pictureBoxKernite.Tag     = OreList.Get("Kernite");
            pictureBoxJaspet.Tag      = OreList.Get("Jaspet");
            pictureBoxHemorphite.Tag  = OreList.Get("Hemorphite");
            pictureBoxHedbergite.Tag  = OreList.Get("Hedbergite");
            pictureBoxGneiss.Tag      = OreList.Get("Gneiss");
            pictureBoxDarkOchre.Tag   = OreList.Get("Dark Ochre");
            pictureBoxSpodumain.Tag   = OreList.Get("Spodumain");
            pictureBoxCrokite.Tag     = OreList.Get("Crokite");
            pictureBoxBistot.Tag      = OreList.Get("Bistot");
            pictureBoxArkonor.Tag     = OreList.Get("Arkonor");
            pictureBoxMercoxit.Tag    = OreList.Get("Mercoxit");

            PutMineralPrices();

            histogram1.ShowLabels = true;
            histogram1.ShowValues = true;
        }
Beispiel #4
0
 // Use this for initialization
 void Start()
 {
     getOres = GameObject.FindGameObjectWithTag("OreList").GetComponent <OreList>();
     StartCoroutine(LoadOre());
 }
 // Use this for initialization
 void Start()
 {
     getOres = GameObject.FindGameObjectWithTag("OreList").GetComponent<OreList>();
     StartCoroutine(LoadOre());
 }
Beispiel #6
0
        /// <summary>
        /// Handles the Click event of the buttonAdd control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void ButtonAddClick(object sender, EventArgs e)
        {
            Ore ore = OreList.Get(comboBoxOre.SelectedItem.ToString());

            try
            {
                double startVolume = Convert.ToDouble(textBoxStartValue.Text);
                if (startVolume == 0)
                {
                    return;
                }
                double        cycle         = Config <Settings> .Instance.Cycle;
                double        miningYield   = Config <Settings> .Instance.MiningAmount;
                TimerListItem timerListItem = new TimerListItem(ore,
                                                                startVolume,
                                                                cycle,
                                                                miningYield);

                DataGridViewRow row = new DataGridViewRow {
                    Tag = timerListItem
                };
                DataGridViewCell[] cells = new DataGridViewCell[dataGridViewTimers.ColumnCount];
                cells[ColumnOre.Index] = new DataGridViewTextBoxCell {
                    Value = timerListItem.ore.Name
                };
                cells[ColumnStartQty.Index] = new DataGridViewTextBoxCell {
                    Value = startVolume
                };
                cells[ColumnCurrentQty.Index] = new DataGridViewTextBoxCell {
                    Value = startVolume
                };
                cells[ColumnTimeToEnd.Index] = new DataGridViewTextBoxCell
                {
                    Value =
                        string.Format("{0:00}:{1:00}", Math.Floor(timerListItem.TimeToAsterEnd / 60),
                                      timerListItem.TimeToAsterEnd % 60)
                };
                cells[ColumnLaser1Start.Index] = new DataGridViewImageCell {
                    Value = Resources.play_24
                };
                cells[ColumnCycle.Index] = new DataGridViewTextBoxCell
                {
                    Value =
                        string.Format("{0:00}:{1:00}", Math.Floor(timerListItem.TimeToCycleEnd / 60),
                                      timerListItem.TimeToCycleEnd % 60)
                };
                DataGridViewComboBoxCell cell = new DataGridViewComboBoxCell();
                cell.Items.AddRange("1", "2", "3", "4", "5", "6", "7", "8");
                cell.Value = "1";
                cells[ColumnLasers.Index] = cell;


                //cells[ColumnButtonDelete.Index] = new DataGridViewButtonCell {Value = "x"};
                cells[ColumnButtonDelete.Index] = new DataGridViewImageCell {
                    Value = Resources.close_24
                };

                row.Cells.AddRange(cells);


                dataGridViewTimers.Rows.Add(row);

                UpdateTimerListItem(row);
                textBoxStartValue.SelectionStart  = 0;
                textBoxStartValue.SelectionLength = textBoxStartValue.TextLength;
            }
            catch (FormatException)
            {
                textBoxStartValue.Text = Resources.TimersForm_ButtonAddClick__0;
            }
        }
        /// <summary>
        /// Handles the Click event of the btnCalculateBars control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void BtnCalculateBarsClick(object sender, EventArgs e)
        {
            double netYield = 0.5;

            try
            {
                netYield = Convert.ToDouble(textBoxNetYield.Text) / 100;
            }
            catch (FormatException)
            {
            }
            //Veldspar
            int         quantity = GetQuantity(textBoxVeldspar0);
            Ore         ore      = OreList.Get("Veldspar");
            MineralsOut minerals = ore.GetMineralsOut(netYield, quantity);

            quantity  = GetQuantity(textBoxVeldspar5);
            ore       = OreList.Get("Concentrated Veldspar");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxVeldspar10);
            ore       = OreList.Get("Dense Veldspar");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Scordite
            quantity  = GetQuantity(textBoxScordite0);
            ore       = OreList.Get("Scordite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxScordite5);
            ore       = OreList.Get("Condensed Scordite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxScordite10);
            ore       = OreList.Get("Massive Scordite");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Pyroxeres
            quantity  = GetQuantity(textBoxPyroxeres0);
            ore       = OreList.Get("Pyroxeres");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxPyroxeres5);
            ore       = OreList.Get("Solid Pyroxeres");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxPyroxeres10);
            ore       = OreList.Get("Viscous Pyroxeres");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Plagioclase
            quantity  = GetQuantity(textBoxPlagioclase0);
            ore       = OreList.Get("Plagioclase");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxPlagioclase5);
            ore       = OreList.Get("Azure Plagioclase");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxPlagioclase10);
            ore       = OreList.Get("Rich Plagioclase");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Omber
            quantity  = GetQuantity(textBoxOmber0);
            ore       = OreList.Get("Omber");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxOmber5);
            ore       = OreList.Get("Silvery Omber");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxOmber10);
            ore       = OreList.Get("Golden Omber");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Kernite
            quantity  = GetQuantity(textBoxKernite0);
            ore       = OreList.Get("Kernite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxKernite5);
            ore       = OreList.Get("Luminous Kernite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxKernite10);
            ore       = OreList.Get("Fiery Kernite");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Jaspet
            quantity  = GetQuantity(textBoxJaspet0);
            ore       = OreList.Get("Jaspet");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxJaspet5);
            ore       = OreList.Get("Pure Jaspet");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxJaspet10);
            ore       = OreList.Get("Pristine Jaspet");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Hemorphite
            quantity  = GetQuantity(textBoxHemorphite0);
            ore       = OreList.Get("Hemorphite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxHemorphite5);
            ore       = OreList.Get("Vivid Hemorphite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxHemorphite10);
            ore       = OreList.Get("Radiant Hemorphite");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Hedbergite
            quantity  = GetQuantity(textBoxHedbergite0);
            ore       = OreList.Get("Hedbergite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxHedbergite5);
            ore       = OreList.Get("Vitric Hedbergite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxHedbergite10);
            ore       = OreList.Get("Glazed Hedbergite");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Gneiss
            quantity  = GetQuantity(textBoxGneiss0);
            ore       = OreList.Get("Gneiss");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxGneiss5);
            ore       = OreList.Get("Iridescent Gneiss");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxGneiss10);
            ore       = OreList.Get("Prismatic Gneiss");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //DarkOchre
            quantity  = GetQuantity(textBoxDarkOchre0);
            ore       = OreList.Get("Dark Ochre");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxDarkOchre5);
            ore       = OreList.Get("Onyx Ochre");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxDarkOchre10);
            ore       = OreList.Get("Obsidian Ochre");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Spodumain
            quantity  = GetQuantity(textBoxSpodumain0);
            ore       = OreList.Get("Spodumain");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxSpodumain5);
            ore       = OreList.Get("Bright Spodumain");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxSpodumain10);
            ore       = OreList.Get("Gleaming Spodumain");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Crokite
            quantity  = GetQuantity(textBoxCrockite0);
            ore       = OreList.Get("Crokite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxCrockite5);
            ore       = OreList.Get("Sharp Crokite");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxCrockite10);
            ore       = OreList.Get("Crystalline Crokite");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Bistot
            quantity  = GetQuantity(textBoxBistot0);
            ore       = OreList.Get("Bistot");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxBistot5);
            ore       = OreList.Get("Triclinic Bistot");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxBistot10);
            ore       = OreList.Get("Monoclinic Bistot");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Arkonor
            quantity  = GetQuantity(textBoxArkonor0);
            ore       = OreList.Get("Arkonor");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxArkonor5);
            ore       = OreList.Get("Crimson Arkonor");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxArkonor10);
            ore       = OreList.Get("Prime Arkonor");
            minerals += ore.GetMineralsOut(netYield, quantity);

            //Mercoxit
            quantity  = GetQuantity(textBoxMercoxit0);
            ore       = OreList.Get("Mercoxit");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxMercoxit5);
            ore       = OreList.Get("Magma Mercoxit");
            minerals += ore.GetMineralsOut(netYield, quantity);
            quantity  = GetQuantity(textBoxMercoxit10);
            ore       = OreList.Get("Vitreous Mercoxit");
            minerals += ore.GetMineralsOut(netYield, quantity);


            RefreshHistogram(minerals);
        }
Beispiel #8
0
        /// <summary>
        /// Загрузка конфига
        /// </summary>
        private void LoadCfg()
        {
            DeviceBonus devBonus;

            if (_dictMlu.ContainsKey(Config <Settings> .Instance.Mlu1))
            {
                devBonus             = _dictMlu[Config <Settings> .Instance.Mlu1];
                pictureBoxMLU1.Image = devBonus.Image;
                pictureBoxMLU1.Tag   = devBonus;
            }

            if (_dictMlu.ContainsKey(Config <Settings> .Instance.Mlu2))
            {
                devBonus             = _dictMlu[Config <Settings> .Instance.Mlu2];
                pictureBoxMLU2.Image = devBonus.Image;
                pictureBoxMLU2.Tag   = devBonus;
            }

            if (_dictMlu.ContainsKey(Config <Settings> .Instance.Mlu3))
            {
                devBonus             = _dictMlu[Config <Settings> .Instance.Mlu3];
                pictureBoxMLU3.Image = devBonus.Image;
                pictureBoxMLU3.Tag   = devBonus;
            }

            if (_turretsList.ContainsKey(Config <Settings> .Instance.SelectedTurret))
            {
                MiningTurret turret = _turretsList[Config <Settings> .Instance.SelectedTurret];
                for (int n = 0; n < comboBoxTurret.Items.Count; n++)
                {
                    if (comboBoxTurret.Items[n] == turret)
                    {
                        comboBoxTurret.SelectedIndex = n;
                    }
                }
            }

            if (_dictShips.ContainsKey(Config <Settings> .Instance.SelectedShip))
            {
                Ship ship = _dictShips[Config <Settings> .Instance.SelectedShip];
                _calculatorForm.SetShip(ship);
                for (int n = 0; n < comboBoxShip.Items.Count; n++)
                {
                    if (comboBoxShip.Items[n] == ship)
                    {
                        comboBoxShip.SelectedIndex = n;
                    }
                }
                if (ship.LowSlots > 1)
                {
                    pictureBoxMLU2.Show();
                }
                if (ship.LowSlots > 2)
                {
                    pictureBoxMLU3.Show();
                }
                if (ship.LowSlots < 3)
                {
                    pictureBoxMLU3.Hide();
                }
                if (ship.LowSlots < 2)
                {
                    pictureBoxMLU2.Hide();
                }
            }

            if (Config <Settings> .Instance.SelectedCrystals == 2)
            {
                radioButtonT2Crystals.Checked = true;
            }
            else
            {
                radioButtonT1Crystals.Checked = true;
            }

            CheckUseCrystals();

            if (_dictImpS10.ContainsKey(Config <Settings> .Instance.ImplantS10))
            {
                devBonus = _dictImpS10[Config <Settings> .Instance.ImplantS10];
                pictureBoxImpSlot10.Image = devBonus.Image;
                pictureBoxImpSlot10.Tag   = devBonus;
            }
            if (Config <Settings> .Instance.ImpMichi)
            {
                pictureBoxImpSlot7.Image = Resources.icon40_16;
            }

            TopMost                 = Config <Settings> .Instance.AlwaysOnTop;
            _timersForm.TopMost     = Config <Settings> .Instance.AlwaysOnTop;
            _calculatorForm.TopMost = Config <Settings> .Instance.AlwaysOnTop;

            //Solo
            skillValueMining.Value        = Config <Settings> .Instance.Skills.Mining;
            skillValueAstrogeology.Value  = Config <Settings> .Instance.Skills.Astrogeology;
            skillValueMiningBarge.Value   = Config <Settings> .Instance.Skills.MiningBarge;
            skillValueExhumers.Value      = Config <Settings> .Instance.Skills.Exhumers;
            skillValueIceHarvesting.Value = Config <Settings> .Instance.Skills.IceHarvesting;
            skillValueMinigFrigates.Value = Config <Settings> .Instance.Skills.MiningFrigates;
            skillValueRefining.Value      = Config <Settings> .Instance.Skills.Refining;
            skillValueEfficiency.Value    = Config <Settings> .Instance.Skills.EfficiencyRefining;
            skillValueIceProcessing.Value = Config <Settings> .Instance.Skills.IceProcessing;

            //Gang
            skillValueMiningForeman.Value         = Config <Settings> .Instance.Skills.MiningForeman;
            skillValueMiningDirector.Value        = Config <Settings> .Instance.Skills.MiningDirector;
            skillValueWarfareLinkSpec.Value       = Config <Settings> .Instance.Skills.WarfareLinkSpec;
            skillValueIndustrialCommandShip.Value = Config <Settings> .Instance.Skills.IndustrialCommandShip;

            skillValueVeldsparP.Value    = Config <Settings> .Instance.Skills.VeldsparProcessing;
            skillValueScorditeP.Value    = Config <Settings> .Instance.Skills.ScorditeProcessing;
            skillValuePyroxeresP.Value   = Config <Settings> .Instance.Skills.PyroxeresProcessing;
            skillValuePlagioclaseP.Value = Config <Settings> .Instance.Skills.PlagioclaseProcessing;
            skillValueOmberP.Value       = Config <Settings> .Instance.Skills.OmberProcessing;
            skillValueKerniteP.Value     = Config <Settings> .Instance.Skills.KerniteProcessing;
            skillValueJaspetP.Value      = Config <Settings> .Instance.Skills.JaspetProcessing;
            skillValueHemorphiteP.Value  = Config <Settings> .Instance.Skills.HemorphiteProcessing;
            skillValueHedbergiteP.Value  = Config <Settings> .Instance.Skills.HedbergiteProcessing;
            skillValueGneissP.Value      = Config <Settings> .Instance.Skills.GneissProcessing;
            skillValueDarkOchreP.Value   = Config <Settings> .Instance.Skills.DarkOchreProcessing;
            skillValueSpodumainP.Value   = Config <Settings> .Instance.Skills.SpodumainProcessing;
            skillValueCrokiteP.Value     = Config <Settings> .Instance.Skills.CrokiteProcessing;
            skillValueBistotP.Value      = Config <Settings> .Instance.Skills.BistotProcessing;
            skillValueArkonorP.Value     = Config <Settings> .Instance.Skills.ArkonorProcessing;
            skillValueMercoxitP.Value    = Config <Settings> .Instance.Skills.MercoxitProcessing;

            checkBoxMindLinkImp.Checked       = Config <Settings> .Instance.ImpMindLink;
            checkBoxUseGangBonus.Checked      = Config <Settings> .Instance.IsGang;
            groupBoxGangBooster.Enabled       = Config <Settings> .Instance.IsGang;
            comboBoxBoosterShip.SelectedIndex = (int)Config <Settings> .Instance.BoosterShip;


            pictureBoxGang1.Image = (Config <Settings> .Instance.GangAssistModule1) ? Resources.icon53_16 : Resources.highSlot;
            pictureBoxGang2.Image = (Config <Settings> .Instance.GangAssistModule2) ? Resources.icon53_16 : Resources.highSlot;
            pictureBoxGang3.Image = (Config <Settings> .Instance.GangAssistModule3) ? Resources.icon53_16 : Resources.highSlot;

            pictureBoxVeldspar.Tag    = OreList.Get("Veldspar");
            pictureBoxScordite.Tag    = OreList.Get("Scordite");
            pictureBoxPyroxeres.Tag   = OreList.Get("Pyroxeres");
            pictureBoxPlagioclase.Tag = OreList.Get("Plagioclase");
            pictureBoxOmber.Tag       = OreList.Get("Omber");
            pictureBoxKernite.Tag     = OreList.Get("Kernite");
            pictureBoxJaspet.Tag      = OreList.Get("Jaspet");
            pictureBoxHemorphite.Tag  = OreList.Get("Hemorphite");
            pictureBoxHedbergite.Tag  = OreList.Get("Hedbergite");
            pictureBoxGneiss.Tag      = OreList.Get("Gneiss");
            pictureBoxDarkOchre.Tag   = OreList.Get("Dark Ochre");
            pictureBoxSpodumain.Tag   = OreList.Get("Spodumain");
            pictureBoxCrokite.Tag     = OreList.Get("Crokite");
            pictureBoxBistot.Tag      = OreList.Get("Bistot");
            pictureBoxArkonor.Tag     = OreList.Get("Arkonor");
            pictureBoxMercoxit.Tag    = OreList.Get("Mercoxit");
        }
Beispiel #9
0
 // Use this for initialization
 void Start()
 {
     nodeColor = this.GetComponent <MeshRenderer> ().material.color;
     getOre    = GameObject.FindGameObjectWithTag("oreList").GetComponent <OreList>();
     Spawn();
 }
 // Use this for initialization
 void Start()
 {
     nodeColor = this.GetComponent<MeshRenderer> ().material.color;
     getOre = GameObject.FindGameObjectWithTag ("oreList").GetComponent<OreList>();
     Spawn ();
 }