// Use this for initialization void Start() { if (instance == null) { instance = this; } }
public void Import() { var mapReader = new MapReader(); mapReader.Read(_mapFile); var buildingMaker = new BuildingMaker(mapReader, _buildingMaterial); var roadMaker = new RoadMaker(mapReader, _roadMaterial); Process(buildingMaker, "Importing buildings"); Process(roadMaker, "Importing roads"); }
void Start() { designer = this.GetComponent <Designer>(); roadMaker = this.GetComponent <RoadMaker>(); objs = new GameObject[maxRail]; //this.UpdateAsObservable() //.Where(_ => flag == false) //.Subscribe(_ => //{ // InsRail(); // flag = true; //}); }
public override void OnInspectorGUI() { serializedObject.Update(); RoadMaker script = (RoadMaker)target; if (GUILayout.Button("RefreshConnections")) { script.RecalulateConnections(); } base.OnInspectorGUI(); if (GUILayout.Button("Build Road")) { script.makeRoad(); } serializedObject.ApplyModifiedProperties(); }
private void Start() { var playerController = GameObject.Find("PlayerController"); playerControll = playerController.GetComponent <PlayerController>(); designer = this.GetComponent <Designer>(); stageMake = this.GetComponent <StageMake>(); roadMaker = this.GetComponent <RoadMaker>(); startComplete = this.GetComponent <StartComplete>(); cellPoint = stageMake.cellPoint; mapData = designer.mapData; maxRail = stageMake.maxRail; Observable.FromCoroutine(FirstCoroutine) .SelectMany(SecondCoroutine) .SelectMany(ThirdCoroutine) .Subscribe(_ => StartCoroutine(ThirdCoroutine())); }
private static int showRoadNowNum = 0;//当前显示到的路径的长度 void Awake() { instance = this; roadMaker = new GeneralRoadMaker(); }
void Awake() { instance = this; roadMaker = new GeneralRoadMaker(); detector = new DefaultDetecter(); }