示例#1
0
        public void BroadcastToggleInternalLight(NitroxId id, bool isOn)
        {
            vehicles.GetVehicles <CyclopsModel>(id).InternalLightsOn = isOn;
            CyclopsToggleInternalLighting packet = new CyclopsToggleInternalLighting(id, isOn);

            packetSender.Send(packet);
        }
示例#2
0
        public void SpawnedArm(Exosuit exosuit)
        {
            string       Guid         = GuidHelper.GetGuid(exosuit.gameObject);
            ExosuitModel exosuitModel = vehicles.GetVehicles <ExosuitModel>(Guid);

            IExosuitArm rightArm = (IExosuitArm)exosuit.ReflectionGet("rightArm");
            IExosuitArm leftArm  = (IExosuitArm)exosuit.ReflectionGet("leftArm");

            try
            {
                GameObject rightArmGameObject = rightArm.GetGameObject();
                rightArmGameObject.SetNewGuid(exosuitModel.RightArmGuid);
                GameObject leftArmGameObject = leftArm.GetGameObject();
                leftArmGameObject.SetNewGuid(exosuitModel.LeftArmGuid);
            } catch (Exception e)
            {
                Log.Warn("Got error setting arm GameObjects. This is probably due to docking sync and can be ignored\nErromessage: " + e.Message + "\n" + e.StackTrace);
            }
            Log.Debug("Spawn exosuit arms for: " + Guid);
        }
示例#3
0
        public void SpawnedArm(Exosuit exosuit)
        {
            NitroxId     id           = NitroxEntity.GetId(exosuit.gameObject);
            ExosuitModel exosuitModel = vehicles.GetVehicles <ExosuitModel>(id);

            IExosuitArm rightArm = exosuit.rightArm;
            IExosuitArm leftArm  = exosuit.leftArm;

            try
            {
                GameObject rightArmGameObject = rightArm.GetGameObject();
                NitroxEntity.SetNewId(rightArmGameObject, exosuitModel.RightArmId);

                GameObject leftArmGameObject = leftArm.GetGameObject();
                NitroxEntity.SetNewId(leftArmGameObject, exosuitModel.LeftArmId);
            }
            catch (Exception e)
            {
                Log.Warn("Got error setting arm GameObjects. This is probably due to docking sync and can be ignored\nErromessage: " + e.Message + "\n" + e.StackTrace);
            }

            Log.Debug("Spawn exosuit arms for: " + id);
        }