public static void CreateSingleFireWeapon() { //A Gameobject needs to be selected to Do the setup. GameObject selectedGO = EF_Editor_Utils.GetSelectedObject("Please select a GameObject to set up as a Weapon"); if (!selectedGO) { return; } CreateWeapon(EF_WeaponType.Single, selectedGO); }
public static void CreateProjectileFireWeapon() { //A Gameobject needs to be selected to Do the setup. GameObject selectedGO = EF_Editor_Utils.GetSelectedObject("Please select a GameObject to set up as a Weapon"); if (!selectedGO) { return; } //We have a gameObject so lets get it set up as a Weapon CreateWeapon(EF_WeaponType.Projectile, selectedGO); }
public static void SetupCharacter() { //get the selected gameobject GameObject curGO = EF_Editor_Utils.GetSelectedObject("Please select a Character to Set up!"); if (!curGO) { return; } //Add the Customizer script to the GameObject EF_CharacterCustomizer curCustomizer = curGO.AddComponent <EF_CharacterCustomizer>(); curCustomizer.InitializeCustomization(); Selection.activeGameObject = curGO; }
public static void CreateFPSCamera() { // Debug.Log("Creating an FPS Camera"); GameObject selectedGO = EF_Editor_Utils.GetSelectedObject("Please Select a Game Object to attach an FPS camera to!"); if (!selectedGO) { return; } //We have a selected Object so lets create an FPS camera for it. GameObject camGO = new GameObject("FPS Camera", typeof(Camera), typeof(EF_FirstPerson_Camera)); camGO.transform.position = new Vector3(0f, 1.5f, 0f); camGO.transform.SetParent(selectedGO.transform); }