public void VisualizePath(List <Vector3> path, PrefabsHolder prefabsHolder) { foreach (var point in path) { var markPlace = point; markPlace.y = markHeight; Instantiate(prefabsHolder.MarkPrefab, markPlace, Quaternion.Euler(90, 0, 0)); } }
void Start() { timer = 0; score = 0; txtScore.text = 0.ToString(); thisInstance = this; audio = GetComponent <AudioSource>(); funcDoNow = new DoNowDelegate(DoNothing); prefabs = new PrefabsHolder("Prefabs"); prefabs.InstantiateMain(); }
public void Start() { prefabsHolder = GameObject.Find("PrefabsHolder").GetComponent <PrefabsHolder>(); //YandexDiskHelper.SaveFile(fileUri, "path2.txt"); var pathComponent = FileDeserializer.DeserializeFile("path2.txt"); walker = new WalkerEntity(pathComponent); var walkerObj = Instantiate(prefabsHolder.WalkerPrefab, startPosition, Quaternion.identity); walker.Object = walkerObj; movementSystem = new MovementSystem(); walker.Component.PathComponent.Path.AlignPointsByHeight(minHeight); walker.SetMovementParameters(); var visualization = new PathVisualization(); visualization.VisualizePath(pathComponent.Path, prefabsHolder); }
private void Awake() { instance = this; }
private void LoadSpellPrefabs() { PrefabsHolder script = FindObjectOfType(typeof(PrefabsHolder)) as PrefabsHolder; prefabs = script.prefabs; }