Upload from upload_mods.ps1
This commit is contained in:
24
KFAttached/KFUtilAttached/WeaponDataController.cs
Normal file
24
KFAttached/KFUtilAttached/WeaponDataController.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class WeaponDataController : WeaponLabelControllerBase
|
||||
{
|
||||
[SerializeField]
|
||||
private WeaponDataHandlerBase[] handlers;
|
||||
public override bool setLabelColor(int index, Color color)
|
||||
{
|
||||
if (handlers == null || index >= handlers.Length || index < 0 || !handlers[index] || !handlers[index].gameObject.activeSelf)
|
||||
return false;
|
||||
|
||||
handlers[index]?.SetColor(color);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool setLabelText(int index, string data)
|
||||
{
|
||||
if (handlers == null || index >= handlers.Length || index < 0 || !handlers[index] || !handlers[index].gameObject.activeSelf)
|
||||
return false;
|
||||
|
||||
handlers[index]?.SetText(data);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user