Ejemplo n.º 1
0
        //we need to replicate what Hackable Start does in here when the character is first created and if the race changes
        //how did this work before? there never were any colliders on any of the UMA Bones- something must have added them?
        public void OnCharacterCreated(UMAData umaData)
        {
            if (infillMaterial == null)
            {
                Debug.LogWarning("No Infill material was specified on " + this.gameObject.name + ". Character will not get sliced!");
                severables = new Transform[0];
                return;
            }
            ConvertUMASeverablesToSeverables();
            Collider[] childColliders = gameObject.GetComponentsInChildren <Collider>();

            foreach (Collider c in childColliders)
            {
                GameObject go = c.gameObject;

                ChildOfHackable referencer = go.GetComponent <ChildOfHackable>();

                if (referencer == null)
                {
                    referencer = go.AddComponent <ChildOfHackable>();
                }

                referencer.parentHackable = this;
            }
        }
Ejemplo n.º 2
0
        void Start()
        {
            Collider[] childColliders = gameObject.GetComponentsInChildren <Collider>();

            foreach (Collider c in childColliders)
            {
                GameObject go = c.gameObject;

                ChildOfHackable referencer = go.GetComponent <ChildOfHackable>();

                if (referencer == null)
                {
                    referencer = go.AddComponent <ChildOfHackable>();
                }

                referencer.parentHackable = this;
            }
        }