// Start is called before the first frame update
 void Awake()
 {
     skillButtons = GetComponents <Button>();
     skillSystem  = GetComponent <CharacterSkillSystem>();
     anim         = GetComponentInChildren <Animator>();
     status       = GetComponent <PlayerStatus>();
 }
示例#2
0
 private void InitComponent()
 {
     anim        = GetComponentInChildren <Animator>();
     chStatus    = GetComponent <CharacterStatus>();
     navAgent    = GetComponent <NavMeshAgent>();
     skillSystem = GetComponent <CharacterSkillSystem>();
 }
 /// <summary>
 /// 初始化其他引用
 /// </summary>
 private void InitReference()
 {
     anim         = GetComponentInChildren <AnimatorPlay>();
     chState      = GetComponent <CharacterState>();
     navMeshAgent = GetComponent <NavMeshAgent>();
     chSkill      = GetComponent <CharacterSkillSystem>();
 }
示例#4
0
 private void Start()
 {
     chStatus   = GetComponent <CharacterStatus>();
     chAnim     = GetComponent <CharacterAnimation>();
     navAngent  = GetComponent <NavMeshAgent>();
     chSkillSys = chStatus.GetComponent <CharacterSkillSystem>();
 }
示例#5
0
 private void Start()
 {
     anim         = GetComponent <Animator>();
     playerStatus = GetComponent <CharaterStatus>();
     chMotor      = GetComponent <PlayerMotor>();
     chMotor.InitMotor(playerStatus);
     skillSystem = GetComponent <CharacterSkillSystem>();
 }
示例#6
0
文件: BaseFSM.cs 项目: ElviraZ/ARPG
 public void Start()
 {
     targetPlayer = GameObject.FindGameObjectWithTag("Player").transform;
     navMeshAgent = GetComponent <NavMeshAgent>();
     anim         = GetComponent <CharacterAnimation>();
     chStatus     = GetComponent <CharacterStatus>();
     chSystem     = GetComponent <CharacterSkillSystem>();
     ConfigFSM();
     //初始化起始状态
     InitDefaultState();
 }
示例#7
0
 public virtual void InitComponent()
 {
     //动画机
     animator = GetComponentInChildren <Animator> ();
     //角色数值
     characterStatus = GetComponent <CharacterStatus> ();
     //初始化位置
     startPosition = transform.position;
     //初始化技能管理器
     skillSystem = GetComponent <CharacterSkillSystem> ();
 }
示例#8
0
    public void Start()
    {
        //所有引用的其它组件在此赋值
        chStatus    = GetComponent <CharacterStatus>();
        chAnim      = GetComponent <CharacterAnimation>();
        navAgent    = GetComponent <UnityEngine.AI.NavMeshAgent>();
        chSkillSys  = GetComponent <CharacterSkillSystem>();
        sightSensor = GetComponent <SightSensor>();
        if (sightSensor != null)
        {
            sightSensor.PerceptInfo   += ProcessSawInfo;
            sightSensor.NoPerceptInfo += ProcessNoSawInfo;
        }

        targetPlayer = GameObject.FindGameObjectWithTag("Player").transform;
        navMeshAgent = GetComponent <UnityEngine.AI.NavMeshAgent>();
        anim         = GetComponent <CharacterAnimation>();
        chSystem     = GetComponent <CharacterSkillSystem>();
        ConfigFSM();
        //初始化起始状态
        InitDefaultState();
    }
示例#9
0
 private void Awake()
 {
     skillSystem = GetComponent <CharacterSkillSystem>();
 }
示例#10
0
 public void Start()
 {
     anim       = GetComponent <Animator>();
     chAnim     = transform.parent.GetComponent <CharacterAnimation>();
     chSkillSys = transform.parent.GetComponent <CharacterSkillSystem>();
 }
示例#11
0
 private void Awake()
 {
     m_skillSystem   = this.GetComponent <CharacterSkillSystem>();
     m_characterMove = this.GetComponent <CharacterMove>();
     m_autoCam       = Camera.main.GetComponent <AutoCam>();
 }
 void Start()
 {
     chMotor        = GetComponent <CharacterMotor>();
     characterSkill = GetComponent <CharacterSkillSystem>();
 }
示例#13
0
 // Use this for initialization
 void Start()
 {
     playerState   = GetComponent <CharacterState>();
     playerMotor   = GetComponent <CharacterMotor>();
     chSkillSystem = GetComponent <CharacterSkillSystem>();
 }
 public void Awake()
 {
     deployer    = this.GetComponentInParent <SkillDeployer> ();
     skillSystem = this.GetComponentInParent <CharacterSkillSystem> ();
 }
示例#15
0
 public void Start()
 {
     anim     = GetComponentInChildren <Animator>();
     chSystem = GetComponent <CharacterSkillSystem>();
 }