mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-12 23:06:56 +08:00
1.6.6
* Added better support for Properties with index parameters, can now support multiple parameters and non-int parameters. * Parameters are now formatted in a more expected fashion (in the `(Type arg0, Type arg1)` format). * Got rid of all the ugly yellow text. * Cleaned up some minor GUI display / layout issues. * Refactored some of CacheMethod into CacheObjectBase
This commit is contained in:
74
src/Tests/TestClass.cs
Normal file
74
src/Tests/TestClass.cs
Normal file
@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MelonLoader;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Explorer.Tests
|
||||
{
|
||||
public class TestClass
|
||||
{
|
||||
public static TestClass Instance => m_instance ?? (m_instance = new TestClass());
|
||||
private static TestClass m_instance;
|
||||
|
||||
public string this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"int indexer: {index}";
|
||||
}
|
||||
}
|
||||
|
||||
public string this[string stringIndex]
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"string indexer: {stringIndex}";
|
||||
}
|
||||
}
|
||||
|
||||
public string this[int arg0, string arg1]
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"arg0: {arg0}, arg1: {arg1}";
|
||||
}
|
||||
}
|
||||
|
||||
public static List<string> TestList = new List<string>
|
||||
{
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"etc..."
|
||||
};
|
||||
|
||||
public static Dictionary<int, List<string>> NestedDictionary = new Dictionary<int, List<string>>
|
||||
{
|
||||
{
|
||||
123,
|
||||
new List<string>
|
||||
{
|
||||
"One",
|
||||
"Two"
|
||||
}
|
||||
},
|
||||
{
|
||||
567,
|
||||
new List<string>
|
||||
{
|
||||
"One",
|
||||
"Two"
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
public static Color TestMethod(float r, float g, float b, float a)
|
||||
{
|
||||
return new Color(r, g, b, a);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user