Beispiel #1
0
            public void SetInfo(ZoneDefinition info)
            {
                this.info = info;
                GetComponent <UnityEngine.Transform>().position    = info.Location.GetPosition();
                GetComponent <UnityEngine.SphereCollider>().radius = info.Location.GetRadius();
                radiationamount = 0f;

                this.rigidbody.position    = GetComponent <UnityEngine.Transform>().position;
                this.rigidbody.constraints = UnityEngine.RigidbodyConstraints.FreezeAll;
                if (float.TryParse(info.radiation, out radiationamount))
                {
                    radiationzone = gameObject.AddComponent <RadiateZone>();
                }
            }
            public void SetInfo(ZoneDefinition info)
            {
                this.info = info;
                GetComponent<UnityEngine.Transform>().position = info.Location.GetPosition();
                GetComponent<UnityEngine.SphereCollider>().radius = info.Location.GetRadius();
                radiationamount = 0f;

                this.rigidbody.position = GetComponent<UnityEngine.Transform>().position;
                this.rigidbody.constraints = UnityEngine.RigidbodyConstraints.FreezeAll;
                if (float.TryParse(info.radiation, out radiationamount))
                  radiationzone = gameObject.AddComponent<RadiateZone>();
            }