private static bool InstegrateValidate() { bl_GunRace km = GameObject.FindObjectOfType <bl_GunRace>(); bl_GameManager gm = GameObject.FindObjectOfType <bl_GameManager>(); return(km == null && gm != null); }
private void OnEnable() { script = (bl_GunRace)target; list = new ReorderableList(serializedObject, serializedObject.FindProperty("GunOrderList"), true, false, true, true); Weapons = bl_GameData.Instance.AllWeaponStringList(); list.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => { var element = list.serializedProperty.GetArrayElementAtIndex(index); string title = (index == 0) ? "Initial" : string.Format("{0} Kills", index); if (index == list.serializedProperty.arraySize - 1) { title = "Last Kill"; } element.intValue = EditorGUI.Popup(rect, title, element.intValue, Weapons, EditorStyles.toolbarDropDown); }; list.drawHeaderCallback = (Rect r) => { EditorGUI.LabelField(r, "Gun List", EditorStyles.boldLabel); }; }
/// <summary> /// /// </summary> protected override void Awake() { base.Awake(); PUM = FindObjectOfType <bl_PickGunManager>(); ASource = GetComponent <AudioSource>(); #if GR if (transform.root.GetComponent <PhotonView>().IsMine) { GunRace = FindObjectOfType <bl_GunRace>(); if (GunRace != null) { GunRace.SetGunManager(this); } else { Debug.Log("Gun Race is not integrated in this map, just go to MFPS -> Addons -> Gun Race -> Integrate, with the map scene open)."); } } #endif //when player instance select player class select in bl_RoomMenu GetClass(); }