MonoBehaviourProcessor - switch (#211)

This commit is contained in:
MichalPetryka 2019-01-01 00:12:50 +01:00 committed by Paul Pacheco
parent 86a11f4761
commit 9dc5ab96a0

View File

@ -67,25 +67,24 @@ void ProcessMethods()
var attrName = ca.Constructor.DeclaringType.ToString();
if (attrName == "Mirror.ServerAttribute")
switch (attrName)
{
case "Mirror.ServerAttribute":
Log.Error("Script " + m_td.FullName + " uses the attribute [Server] on the method " + md.Name + " but is not a NetworkBehaviour.");
Weaver.fail = true;
}
else if (attrName == "Mirror.ServerCallbackAttribute")
{
break;
case "Mirror.ServerCallbackAttribute":
Log.Error("Script " + m_td.FullName + " uses the attribute [ServerCallback] on the method " + md.Name + " but is not a NetworkBehaviour.");
Weaver.fail = true;
}
else if (attrName == "Mirror.ClientAttribute")
{
break;
case "Mirror.ClientAttribute":
Log.Error("Script " + m_td.FullName + " uses the attribute [Client] on the method " + md.Name + " but is not a NetworkBehaviour.");
Weaver.fail = true;
}
else if (attrName == "Mirror.ClientCallbackAttribute")
{
break;
case "Mirror.ClientCallbackAttribute":
Log.Error("Script " + m_td.FullName + " uses the attribute [ClientCallback] on the method " + md.Name + " but is not a NetworkBehaviour.");
Weaver.fail = true;
break;
}
}
}