private void EditSceneBT_Click(object sender, EventArgs e) { if (InputControler.ControlOwnForm(sceneOutput.Text, imageOutput.Text, sceneWidth.Text, sceneHeight.Text, superSamples.Text, lightSamples.Text, indirectLightSamples.Text, recursionDepth.Text, true)) { Close(); } }
private void saveBt_Click(object sender, EventArgs e) { if (InputControler.ControlRandomForm(sceneOutput.Text, imageOutput.Text, sceneWidth.Text, sceneHeight.Text, superSamples.Text, shapeCount.Text, lightCount.Text, lightSamples.Text, indirectLightSamples.Text, recursionDepth.Text)) { ImageControler.FileManipulator.SaveSceneToXML(); Close(); } }
//private GameObject tempHint; //private bool isfocused = false; void Awake() { if (Instance == null) { Instance = this; } else { Destroy(this); } }
private void SaveOwnSceneBT_Click(object sender, EventArgs e) { if (InputControler.ControlOwnForm(sceneOutput.Text, imageOutput.Text, sceneWidth.Text, sceneHeight.Text, superSamples.Text, lightSamples.Text, indirectLightSamples.Text, recursionDepth.Text, false)) { ImageControler.FileManipulator.SaveSceneToXML(); Close(); } }
// --------------------------------------------------------------------------------------------------------------------- ** #region NATIVES FUNCTIONS // ----------------------------------------------------------------------- ** private void Start() { hudManager = HudManager.Singleton; inventory = GameManager.Singleton.playerInventory; inputControler = GameManager.Singleton.inputControler; animator = GetComponent <Animator>(); InitInventory(); state = State.Close; }
void Awake() { if (Instance == null) { Instance = this; Instance.isInputEnabled = true; } else { Destroy(gameObject); } }
// Use this for initialization void Start() { //Components refs gameManager = GameManager.Singleton; controller = GetComponent <Controller2D>(); animator = GetComponent <Animator>(); playerFight = GetComponent <PlayerFight>(); inputs = gameManager.inputControler; cameraController = Camera.main.GetComponent <CameraController>(); camera2D = cameraController.GetComponent <Camera2D>(); StartCoroutine(UpdateLastGroundedPos()); }
// point 1 and 2 defining a line public void SeparateGroup(Vector3 point1, Vector3 point2) { Debug.Log(gameObject + ": separating"); int objCount = AllAgents.Length; List <GameObject> rightObjects = new List <GameObject>(); List <GameObject> leftObjects = new List <GameObject>(); Vector3 lineNormal = point2 - point1; foreach (GameObject floakObj in AllAgents) { bool side = InputControler.GetPointSide(point1, point2, floakObj.transform.position); //Debug.Log(floakObj + ": added to the " + (side ? "left" : "rigth") + " side"); if (side) { leftObjects.Add(floakObj); } else { rightObjects.Add(floakObj); } } _inputControler.rightObjects = rightObjects; _inputControler.leftObjects = leftObjects; // if we actually separate something if (rightObjects.Count != 0 && leftObjects.Count != 0) { Unselect(); Vector3 newRightPos = GetBarycenter(rightObjects) + distanceForNewGroup * Vector3.Cross(lineNormal, Vector3.up); Vector3 newLeftPos = GetBarycenter(leftObjects) + distanceForNewGroup * Vector3.Cross(lineNormal, -Vector3.up); GameObject newRightGroup = Instantiate(g_GroupPrefab, Vector3.zero, Quaternion.identity); newRightGroup.GetComponent <Groupe>().SetupGroup(rightObjects.ToArray()); newRightGroup.GetComponent <Groupe>().g_GoalPos = newRightPos; GameObject newLeftGroup = Instantiate(g_GroupPrefab, Vector3.zero, Quaternion.identity); newLeftGroup.GetComponent <Groupe>().SetupGroup(leftObjects.ToArray()); newRightGroup.GetComponent <Groupe>().g_GoalPos = newLeftPos; Destroy(gameObject); } }
private void Awake() { if (singleton == null) { singleton = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } QualitySettings.vSyncCount = 0; Application.targetFrameRate = 200; inputControler = gameObject.AddComponent <InputControler>(); gameData = new GameData(); gameData.Init(); }
// public static Groupe selectedObject = null; void Start() { _inputControler = GameManager.gm.GetComponent <InputControler>(); }