|
|
|
|
@ -17,6 +17,8 @@ public class CharacterBehaviour : MonoBehaviour |
|
|
|
|
public Material mat; |
|
|
|
|
|
|
|
|
|
public Area area; |
|
|
|
|
public List<Area> AppearArea = new List<Area>(); |
|
|
|
|
|
|
|
|
|
public Vector2 wallRoi; |
|
|
|
|
public Vector2 heightRange = new Vector2(0.0f, 0.5f); |
|
|
|
|
float origin_height = 0.0f; |
|
|
|
|
@ -117,11 +119,14 @@ public class CharacterBehaviour : MonoBehaviour |
|
|
|
|
StartCoroutine(RandomPosNoTriggerOther()); |
|
|
|
|
color = new Color(1,1,1,0); |
|
|
|
|
StartCoroutine(Sleep()); |
|
|
|
|
if (fakeButton != null) |
|
|
|
|
fakeButton.gameObject.SetActive(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void OnDisable() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
if (fakeButton != null) |
|
|
|
|
fakeButton.gameObject.SetActive(false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
IEnumerator PlayOnStart() |
|
|
|
|
@ -182,7 +187,7 @@ public class CharacterBehaviour : MonoBehaviour |
|
|
|
|
void RandomAppearWall() |
|
|
|
|
{ |
|
|
|
|
Vector3 newPos = Vector3.zero; |
|
|
|
|
area = (Area)Random.Range(0, 3); |
|
|
|
|
area = AppearArea[Random.Range(0, AppearArea.Count)]; |
|
|
|
|
Quaternion q = new Quaternion(); |
|
|
|
|
if (area == Area.LeftWall) |
|
|
|
|
{ |
|
|
|
|
|