public VoiceData(ulong _id) { id = _id; SNet_Controller controller = SNet_Controller.list.Find(x => x.identity.identity == id); aSource = (controller != null) ? controller.identity.asource : instance.source2d; }
// Use this for initialization void Start() { rBody = GetComponent <Rigidbody>(); identity = GetComponent <SNet_Identity>(); controller = GetComponent <SNet_Controller>(); lastAngularVelocity = rBody.angularVelocity; lastVelocity = rBody.velocity; rMessage = new RB(identity.identity); nextUpdate = Time.time + Random.Range(1f, 3f); list.Add(this); }
public void Set(ulong _identity, string _prefab) { identity = _identity; prefab = _prefab; animator = GetComponent <SNet_Animator>(); rbody = GetComponent <SNet_Rigidbody>(); tform = GetComponent <SNet_Transform>(); controller = GetComponent <SNet_Controller>(); ragdoll = GetComponent <RagdollHelper>(); explosive = GetComponent <Explosive>(); vehicle = GetComponent <SNet_Vehicle>(); asource = GetComponent <AudioSource>(); if (_identity < 1000000 && identity > SNet_Network.SNetMessage.idStep) { SNet_Network.SNetMessage.idStep = identity; } /* * MAX REALTIME NETWORK OBJECTS LIMIT is 1.000.000 * */ set = true; }
private void Awake() { animator = GetComponent <Animator>(); identity = GetComponent <SNet_Identity>(); controller = GetComponent <SNet_Controller>(); }