38 lines
878 B
C#
38 lines
878 B
C#
//----------------------------------------------
|
|
// Realistic Car Controller
|
|
//
|
|
// Copyright © 2023 BoneCracker Games
|
|
// http://www.bonecrackergames.com
|
|
//
|
|
//----------------------------------------------
|
|
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
/// <summary>
|
|
/// UI siren button.
|
|
/// </summary>
|
|
[AddComponentMenu("BoneCracker Games/Realistic Car Controller/UI/Modification/RCC UI Siren Button")]
|
|
public class RCC_UI_Siren : MonoBehaviour {
|
|
|
|
public int index = 0;
|
|
|
|
public void Upgrade() {
|
|
|
|
RCC_CustomizationManager handler = RCC_CustomizationManager.Instance;
|
|
|
|
if (!handler) {
|
|
|
|
Debug.LogError("You are trying to customize the vehicle, but there is no ''RCC_CustomizationManager'' in your scene yet.");
|
|
return;
|
|
|
|
}
|
|
|
|
handler.Siren(index);
|
|
|
|
}
|
|
|
|
}
|