Пример #1
0
 //查找角色
 private void Awake()
 {
     //整个项目中只有这样一个类型可以这么找
     joystick      = FindObjectOfType <ETCJoystick>();
     moter         = GetComponent <CharacterMotor>();
     playersStatus = GetComponent <PlayerStatus>();
     animator      = GetComponentInChildren <Animator>();
     etcButtons    = FindObjectsOfType <ETCButton>();
     playerSkills  = GetComponent <CharacterSkillManager>();
     skillSystem   = GetComponent <CharacterSkillSystem>();
 }
Пример #2
0
 /// <summary>
 /// 初始化字段:复杂类型【自定义类型】的字段
 /// </summary>
 private void Start()
 {
     chMotor    = GetComponent <CharacterMotor>();
     chSkillSys = GetComponent <CharacterSkillSystem>();
     RestMouse();
 }