示例#1
0
        public static void AddVitalsSystem()
        {
            var go = NetObjectAssists.GetSelectedGameObject();

            if (!go)
            {
                return;
            }

            AddSystem(go, true);
        }
示例#2
0
        public static void AddInventorySystem()
        {
            var go = NetObjectAssists.GetSelectedGameObject();

            if (!go)
            {
                return;
            }

            AddSystem(go, true);

            ///// Add AutoMountHitscan if has rb and doesn't exist yet
            //if (go.transform.GetNestedComponentInParents<Rigidbody>() || go.transform.GetNestedComponentInParents<Rigidbody2D>())
            //	if (!go.transform.GetNestedComponentInChildren<AutoMountHitscan>())
            //		AddAutoMountHitscan();
        }
示例#3
0
        public static void ConvertToDamageZone()
        {
            var selection = NetObjectAssists.GetSelectedGameObject();

            if (selection != null)
            {
                if (!selection.CheckReparentable())
                {
                    return;
                }
            }

            selection.EnsureComponentExists <ContactTrigger>();
            selection.EnsureComponentExists <OnTriggerApplyDamage>();

            selection.SetAllCollidersAsTriggger(true);
        }