Ejemplo n.º 1
0
        void AddRemoveEmptyObjectBehavior(RoR2.SceneDirector obj)
        {
            var purchasables = Object.FindObjectsOfType <RoR2.PurchaseInteraction>();

            foreach (var purchase in purchasables)
            {
                var reo = purchase.gameObject.GetComponent <RemoveEmptyObject>();
                if (reo == null)
                {
                    purchase.gameObject.AddComponent <RemoveEmptyObject>();
                }
            }
            var barrels = Object.FindObjectsOfType <RoR2.BarrelInteraction>();

            foreach (var barrel in barrels)
            {
                var reo = barrel.gameObject.GetComponent <RemoveEmptyObject>();
                if (reo == null)
                {
                    barrel.gameObject.AddComponent <RemoveEmptyObject>();
                }
            }
        }
Ejemplo n.º 2
0
 void DumpInteractables(RoR2.SceneDirector obj)
 {
     PurchaseInteractions = GameObject.FindObjectsOfType <RoR2.PurchaseInteraction>().ToList();
     Barrels       = GameObject.FindObjectsOfType <RoR2.BarrelInteraction>().ToList();
     SecretButtons = GameObject.FindObjectsOfType <RoR2.PressurePlateController>().ToList();
 }