Exemple #1
0
        void OnEnable()
        {
            controllerNormal = GameObject.FindGameObjectWithTag(Tags.C).GetComponent<Controller>();
            controllerSO = new SerializedObject(controllerNormal);

            postSO = new SerializedObject(targets);
            postNormal = (TradePost)target;
            postNormal.tag = Tags.TP;

            sel = controllerNormal.selected.P;
            showLinks = controllerSO.FindProperty("showLinks");
            smallScroll = controllerSO.FindProperty("smallScroll");

            scrollPos = controllerNormal.scrollPos;

            stock = postSO.FindProperty("stock");
            controllerGoods = controllerSO.FindProperty("goods");
            currencies = postSO.FindProperty("currencies");
            exchanges = postSO.FindProperty("exchanges");
            manufacturing = postSO.FindProperty("manufacture");
            controllerMan = controllerSO.FindProperty("manufacture");
            customPricing = postSO.FindProperty("customPricing");

            stopProcesses = postSO.FindProperty("stopProcesses");
            allowTrades = postSO.FindProperty("allowTrades");
            allowMan = postSO.FindProperty("allowManufacture");

            GUITools.GetNames(controllerNormal);
            GUITools.ManufactureInfo(controllerNormal);

            expendable = controllerNormal.expTraders.enabled;

            if (!Application.isPlaying)//only do this if it isnt playing
                controllerNormal.SortAll();
        }//end OnEnable
Exemple #2
0
				void OnEnable ()
				{
						controllerNormal = GameObject.FindGameObjectWithTag (Tags.C).GetComponent<Controller> ();
						controllerSO = new SerializedObject (controllerNormal);
			
						spawnerSO = new SerializedObject (targets);
						spawnerNormal = (Spawner)target;
						spawnerNormal.tag = Tags.S;
			
						sel = controllerNormal.selected.S;
						smallScroll = controllerSO.FindProperty ("smallScroll");
			
						minTime = spawnerSO.FindProperty ("minTime");
						maxTime = spawnerSO.FindProperty ("maxTime");
			
						min = spawnerSO.FindProperty ("min");
						max = spawnerSO.FindProperty ("max");
						tot = spawnerSO.FindProperty ("maxSpawn");
						diff = spawnerSO.FindProperty ("diffItems");
						countCrates = spawnerSO.FindProperty ("countCrates");
						
						maxDist = spawnerSO.FindProperty ("maxDist");
						
						specifySeed = spawnerSO.FindProperty ("specifySeed");
						seed = spawnerSO.FindProperty ("seed");
						
						traderCollect = spawnerSO.FindProperty ("traderCollect");
			
						scrollPos = controllerNormal.scrollPos;
			
						GUITools.GetNames (controllerNormal);
						
						if (!Application.isPlaying)//only do this if it isnt playin
								controllerNormal.SortAll ();
				}//end OnEnable
Exemple #3
0
        void OnEnable()
        {
            controllerNormal = GameObject.FindGameObjectWithTag(Tags.C).GetComponent<Controller>();
            controllerSO = new SerializedObject(controllerNormal);

            traderSO = new SerializedObject(targets);
            traderNormal = (Trader)target;
            traderNormal.tag = Tags.T;

            sel = controllerNormal.selected.T;
            smallScroll = controllerSO.FindProperty("smallScroll");

            scrollPos = controllerNormal.scrollPos;

            targetPost = traderSO.FindProperty("target");
            cargoSpace = traderSO.FindProperty("cargoSpace");
            closeDistance = traderSO.FindProperty("closeDistance");
            collect = traderSO.FindProperty("allowCollect");

            currencies = traderSO.FindProperty("currencies");
            exchanges = traderSO.FindProperty("exchanges");

            posts = GameObject.FindGameObjectsWithTag(Tags.TP);

            manufacturing = traderSO.FindProperty("manufacture");

            dropCargo = traderSO.FindProperty("dropCargo");
            dropSingle = traderSO.FindProperty("dropSingle");

            GUITools.GetNames(controllerNormal);
            GUITools.ManufactureInfo(controllerNormal);

            expendable = controllerNormal.expTraders.enabled;

            if (!Application.isPlaying)//only do this if it isnt playin
                controllerNormal.SortAll();
        }//end OnEnable