Первый коммит
This commit is contained in:
37
Assets/RealisticCarControllerV3/Scripts/RCC_UI_Spoiler.cs
Normal file
37
Assets/RealisticCarControllerV3/Scripts/RCC_UI_Spoiler.cs
Normal file
@ -0,0 +1,37 @@
|
||||
//----------------------------------------------
|
||||
// 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 spoiler button.
|
||||
/// </summary>
|
||||
[AddComponentMenu("BoneCracker Games/Realistic Car Controller/UI/Modification/RCC UI Spoiler Button")]
|
||||
public class RCC_UI_Spoiler : 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.Spoiler(index);
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user