protected virtual void Start() { // floor! GameObject baseCylindcer = ReferenceBuffer.Instance.gl.CylinderBasePrefab(new Vector3(40, 1, 40), true); // player and cam! this.player = ReferenceBuffer.Instance.gl.Player(new Vector3(0, 0, 10), true, true, true); this.mainCamera = GameObject.Find("MainCamera"); this.mainSpellCamera = GameObject.Find("Camera"); /// second cam is Camera2 this.secondSpellCamera = GameObject.Find("Camera2"); CamHandling camHandling = this.mainCamera.GetComponent <CamHandling>(); camHandling.target = this.player.transform; // spellcraft SpellcraftProcUI procUI = gameObject.AddComponent <SpellcraftProcUI>(); this.worldSpaceUI = gameObject.AddComponent <WorldSpaceUI>(); this.worldSpaceUI.Setup(new Vector3(0, -40, 0)); this.worldSpaceUI.LoadLevel = false; ReferenceBuffer.Instance.RegisterWorldSapceUI(this.worldSpaceUI); // drone setup this.droneCamGO = GameObject.Find("DroneCamera"); this.droneCamGO.GetComponent <Camera>().enabled = false; this.droneCamGO.transform.position = new Vector3(5, 5, 5); this.droneCamGO.AddComponent <Drone>(); this.droneCamGO.SetActive(false); }
public DrawConstantSelection(Color baseColor, GenerateBasicElements generator, SpellcraftProcUI procUI) : base( baseColor, generator, procUI) { }
private void Start() { if (transperantMat == null) { this.transperantMat = Resources.Load("Materials/transperantMat", typeof(Material)) as Material; this.inputPanelPrefab = Resources.Load("Prefabs/WorldSpaceCanvases/ConstantCanvasPrefab", typeof(GameObject)) as GameObject; this.resultAndVariablesPanelPrefab = Resources.Load("Prefabs/WorldSpaceCanvases/ResultCanvasPrefab", typeof(GameObject)) as GameObject; this.worldSpaceTextPrefab = Resources.Load("Prefabs/WorldSpaceCanvases/WorldSpaceTextPrefab", typeof(GameObject)) as GameObject; } this.spellcraftParent = new GameObject("Spellcraft Parent"); this.persistantParent = new GameObject("Persistant Parent"); this.connTracker = new ConnectionsTracker(this); //Rotation of class nodes implementation that wull be replaced this.rotatorGO = new GameObject("Rotator"); this.rotatorGO.transform.SetParent(this.spellcraftParent.transform); //... //Parented this.drawer = new LineDrawer(this); this.drawer.DrawBox(SpellcraftConstants.HalfSize, SpellcraftConstants.Thickness, SpellcraftConstants.BoxCenter); this.myCamera = GameObject.Find("Camera").GetComponent <Camera>(); this.camHandling = this.myCamera.gameObject.AddComponent <SpellcraftCam>(); this.myCamera2 = GameObject.Find("Camera2").GetComponent <Camera>(); this.camHandling2 = this.myCamera2.gameObject.AddComponent <SpellMenuDragCam>(); this.myCamera2.enabled = false; this.procUI = this.GetComponent <SpellcraftProcUI>(); this.procUI.Setup(this.myCamera2, this.connTracker, 0.035f); // Procedural SpellCraftUI float YY = 1000; this.procUI.SetCanvasPosition(new Vector3(0, YY, -1000)); this.procUIAnchor = new GameObject("ProcUIAnchor"); this.procUIAnchor.transform.position = new Vector3(0, YY, -2000); GameObject center = new GameObject("Center"); center.transform.SetParent(this.spellcraftParent.transform); this.camHandling.Setup(center); this.classVisualisation = new ClassVisualisation(this); this.resultCanvas = new ResultCanvas(this.resultAndVariablesPanelPrefab, this.myCamera, this.connTracker, this.persistantParent.transform); this.resultCanvas.SetPosition(new Vector3(0, 0, -25)); this.resultCanvas.SetScale(new Vector3(0.02f, 0.02f, 0.02f)); this.resultCanvas.Hide(); this.inputCanvas = new InputCanvas(this.myCamera, this.inputPanelPrefab, this.persistantParent.transform); //Extract that somewhere this.resultGO = GameObject.CreatePrimitive(PrimitiveType.Sphere); this.resultGO.name = "Result GO"; this.resultGO.transform.SetParent(this.persistantParent.transform); this.resultGO.transform.position = new Vector3(0, -15, 0); this.resultNode = this.resultGO.AddComponent <ResultNode>(); //... this.connRegisterer = new ConnectionsRegisterer(this.connTracker, this.inputCanvas, this.drawer, this.resultNode); this.infoCanvas = new InfoCanvas(this.worldSpaceTextPrefab, this.myCamera, this.spellcraftParent.transform); this.levels = new Setups(this.resultCanvas, this.inputCanvas, this.connRegisterer, this, this.resultNode, this.classVisualisation); this.resultCanvasVantigePoint = new GameObject("VantigePoint"); this.resultCanvasVantigePoint.transform.position = new Vector3(0, 0, -30); this.resultCanvasVantigePoint.transform.SetParent(this.spellcraftParent.transform); this.dynamicSetup = new DynamicSetup(this.classVisualisation, this, this.resultCanvas, this.inputCanvas); //this.levels.JustTwoAddMethod(true); if (LoadLevel) { this.levels.LineDestroyer(false); } else { this.connTracker.RegisterBundle(null); } this.spellcraftParent.transform.position = this.position; this.persistantParent.transform.position = this.position; }
public DrawActionButtonMapping(Color baseColor, GenerateBasicElements generator, SpellcraftProcUI procUI) : base(baseColor, generator, procUI) { }
public DrawSavingCube(Color baseColor, GenerateBasicElements generator, SpellcraftProcUI procUI) : base(baseColor, generator, procUI) { }
//DiContainer container = new DiContainer(); public DrawTypesSelection(Color baseColor, GenerateBasicElements generator, SpellcraftProcUI procUI) : base( baseColor, generator, procUI) { //this.selectableButtons = this.container.Instantiate<SelectableButtons>(); }
public GenerateBasicElements(SpellcraftProcUI procUI) { this.procUI = procUI; }
public SpellcraftProcUIElement(Color baseColor, GenerateBasicElements generator, SpellcraftProcUI procUI) { this.baseColor = baseColor; this.generator = generator; this.procUI = procUI; }