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,28 +67,27 @@ void ProcessMethods()
var attrName = ca.Constructor.DeclaringType.ToString();
if (attrName == "Mirror.ServerAttribute")
switch (attrName)
{
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")
{
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")
{
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")
{
Log.Error("Script " + m_td.FullName + " uses the attribute [ClientCallback] on the method " + md.Name + " but is not a NetworkBehaviour.");
Weaver.fail = true;
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;
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;
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;
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;
}
}
}
}
}
}
}