Exemplo n.º 1
0
    public void Awake()
    {
        body        = GetComponent <Rigidbody>();
        has_control = true;
        is_active   = true;

        car = GetComponent <CarController>();

        if (deactivate_on_startup)
        {
            Active(false, false);
        }

        SetName(GameManager.instance.PlayerTags.GetPlayerTag(player_number), CarStatics.StringToColor(GameManager.instance.ColorHolder.GetCarColor(player_number)));
    }
Exemplo n.º 2
0
    void Start()
    {
        SkyCarBody.GetComponent <MeshRenderer>().material       = carMaterials.primaryColor;
        SkyCarComponents.GetComponent <MeshRenderer>().material = carMaterials.windowTint;

        foreach (GameObject mudguard in SkyCarMudguards)
        {
            mudguard.GetComponent <MeshRenderer>().material = carMaterials.mudguardColor;
        }

        foreach (GameObject wheel in SkyCarWheels)
        {
            wheel.GetComponent <MeshRenderer>().material = carMaterials.wheelColor;
        }

        GeneralUIController.instance.SetColor(player_number, CarStatics.StringToColor(GameManager.instance.ColorHolder.GetCarColor(player_number)));
    }