Ejemplo n.º 1
0
    void OnTriggerEnter(Collider Object)
    {
        if (!Current)
        {
            try
            {
                Vehicle       VC  = Object.transform.root.GetComponent <Vehicle>();
                MirrorVehicle MRD = Object.transform.root.GetComponent <MirrorVehicle>();

                if (VC != null)
                {
                    if (MRD.Occupied && VC.ID.hasAuthority)
                    {
                        VC.CurrentShop = this;
                        Current        = VC;
                        Set(true);
                    }
                }
            }catch {}
        }
    }
Ejemplo n.º 2
0
    void Start()
    {
        MRD = GetComponent <MirrorVehicle>();
        MRD.Initialize();

        Initialize();

        if (this.gameObject.tag == "EODD")
        {
            MRD.CmdToggleLocked();
        }

        ID             = GetComponent <NetworkIdentity>();
        r              = GetComponent <Rigidbody>();
        r.centerOfMass = Config.CenterOfMass;
        MM             = GameObject.FindWithTag("Camera").GetComponent <MenuManager>();
        RadioHUD       = GameObject.FindWithTag("HUD").GetComponent <HUD>();
        if (ID.hasAuthority)
        {
            GetComponent <MirrorVehicle>().CmdRefreshVehicle();
        }
    }