您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
23 行
629 B
23 行
629 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Tilemaps;
|
|
|
|
[CreateAssetMenu]
|
|
public class #SCRIPTNAME# : RuleTile<#SCRIPTNAME#.Neighbor> {
|
|
|
|
public bool customField;
|
|
|
|
public class Neighbor : RuleTile.TilingRule.Neighbor {
|
|
public const int Null = 3;
|
|
public const int NotNull = 4;
|
|
}
|
|
|
|
public override bool RuleMatch(int neighbor, TileBase tile) {
|
|
switch (neighbor) {
|
|
case Neighbor.Null: return tile == null;
|
|
case Neighbor.NotNull: return tile != null;
|
|
}
|
|
return base.RuleMatch(neighbor, tile);
|
|
}
|
|
}
|