一款基于卡牌的塔防游戏,类似于 Supercell 的《皇室战争》的游戏玩法(简化形式), 可以与“非智能”AI 进行比赛。
您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

54 行
2.0 KiB

using UnityEngine;
namespace UnityEditor.ShaderGraph.UnitTests
{
/*
[TestFixture]
public class PropertyGeneratorTests
{
[OneTimeSetUp]
public void RunBeforeAnyTests()
{
Debug.unityLogger.logHandler = new ConsoleLogHandler();
}
private const string kPropertyName = "ThePropertyName";
private const string kPropertyDescription = "ThePropertyDescription";
[Test]
public void TestCanAddPropertyChunkToPropertyGenerator()
{
var chunk = new FloatPropertyChunk(kPropertyName, kPropertyDescription, 0.5f, PropertyChunk.HideState.Visible);
var generator = new PropertyCollector();
generator.AddShaderProperty(chunk);
Assert.AreNotEqual(string.Empty, generator.GetPropertiesBlock(0));
}
[Test]
public void TestCanGetShaderStringWithIndentWorks()
{
var chunk = new FloatPropertyChunk(kPropertyName, kPropertyDescription, 0.5f, PropertyChunk.HideState.Visible);
var generator = new PropertyCollector();
generator.AddShaderProperty(chunk);
Assert.AreEqual(0, generator.GetPropertiesBlock(0).Count(x => x == '\t'));
Assert.AreEqual(1, generator.GetPropertiesBlock(1).Count(x => x == '\t'));
Assert.AreEqual(2, generator.GetPropertiesBlock(2).Count(x => x == '\t'));
}
[Test]
public void TestCanGetConfiguredTextureInfos()
{
var chunk = new TexturePropertyChunk(kPropertyName, kPropertyDescription, null, TextureType.Bump, PropertyChunk.HideState.Visible, TexturePropertyChunk.ModifiableState.Modifiable);
var generator = new PropertyCollector();
generator.AddShaderProperty(chunk);
var infos = generator.GetConfiguredTexutres();
Assert.AreEqual(1, infos.Count);
Assert.AreEqual(kPropertyName, infos[0].name);
Assert.AreEqual(0, infos[0].textureId);
Assert.AreEqual(TexturePropertyChunk.ModifiableState.Modifiable, infos[0].modifiable);
}
}*/
}