1、Assets/li_test/stateB.cs(5,15): error CS0737: stateB' does not implement interface member
IState_test.OnStart(par_test)' and the best implementing candidate `stateB.OnStart(par_test)' in not public
void OnStart (par_test obj) 接口没 public
改:public void OnStart (par_test obj)
2、The name `temp' does not exist in the current context
没声明变量就直接使用了
3、Assets/liangxie_test/FSM/playerState.cs(35,30): error CS0128: A local variable named `idleState' is already defined in this scope
局部变量已经存在了,定义重复了
4、 is never assigned to, and will always have its default value `null'
没有分配地址,默认为null
5\error CS1520: Class, struct, or interface method must have a return type
结构写错了(拼写、语法等)
6\he type or namespace name `Tranform' could not be found. Are you missing a using directive or an assembly reference?
类型对应错了
player = GameObject.FindWithTag ("Player");
7\Type Player' does not contain a definition for
transform' and no extension method transform' of type
Player' could be found (are you missing a using directive or an assembly reference?)
没有 : 玩家没有继承mono ,不能使用transform等
public class Player : MonoBehaviour
8、UpDownRunState' does not implement interface member
IEventListener.HandleEvent(int, object, object)'
没有实现接口的方法
9\Object reference not set to an instance of an object
也就是没有实例化一个对象。
当声明了变量,但是没有赋值,仍然为null.用的时候就会报错.
还有一种情况是,
出错原因:可能是你使用的语言包版本不对应或错误的修改了新闻文件。
解决方法:使用与[新闻系统版本对应的语言包文件。修改[新闻系统]文件时不要删除已有的控件