GoToVehicle() public static method

public static GoToVehicle ( ushort vehicleId, Vector3 pos ) : void
vehicleId ushort
pos Vector3
return void
        private void clickGoToVehicle(UIComponent component, UIMouseEventParameter eventParam)
        {
            ushort  vehicleId = Convert.ToUInt16(_goToField.text);
            Vehicle vehicle   = Singleton <VehicleManager> .instance.m_vehicles.m_buffer[vehicleId];

            if ((vehicle.m_flags & Vehicle.Flags.Created) != 0)
            {
                CameraCtrl.GoToVehicle(vehicleId, new Vector3(vehicle.GetLastFramePosition().x, Camera.main.transform.position.y, vehicle.GetLastFramePosition().z));
            }
        }
Beispiel #2
0
        private void clickGoToVehicle(UIComponent component, UIMouseEventParameter eventParam)
        {
#if DEBUG
            if (title != null)
            {
                if (CustomPathManager._replacementPathFinds != null && CustomPathManager._replacementPathFinds.Length >= 1)
                {
                    title.text = CustomPathManager._replacementPathFinds[0].m_queuedPathFindCount.ToString();
                }
                else
                {
                    title.text = "n/a";
                }
            }
#endif

            ushort  vehicleId = Convert.ToUInt16(_goToField.text);
            Vehicle vehicle   = Singleton <VehicleManager> .instance.m_vehicles.m_buffer[vehicleId];
            if ((vehicle.m_flags & Vehicle.Flags.Created) != Vehicle.Flags.None)
            {
                CameraCtrl.GoToVehicle(vehicleId, new Vector3(vehicle.GetLastFramePosition().x, Camera.main.transform.position.y, vehicle.GetLastFramePosition().z));
            }
        }