質問編集履歴
1
staticの後にeventを入れるのを忘れていました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
public class Main : MonoBehaviour
|
29
29
|
{
|
30
30
|
public delegate void Teleport();
|
31
|
-
public static Teleport onTeleport;
|
31
|
+
public static event Teleport onTeleport;
|
32
32
|
|
33
33
|
public void Teleporting()
|
34
34
|
{
|
@@ -67,7 +67,7 @@
|
|
67
67
|
public class Main : MonoBehaviour
|
68
68
|
{
|
69
69
|
public delegate void Teleport(Vector3 pos);
|
70
|
-
public static Teleport onTeleport;
|
70
|
+
public static event Teleport onTeleport;
|
71
71
|
|
72
72
|
private void Update()
|
73
73
|
{
|