// Start is called before the first frame update void Awake() { skillButtons = GetComponents <Button>(); skillSystem = GetComponent <CharacterSkillSystem>(); anim = GetComponentInChildren <Animator>(); status = GetComponent <PlayerStatus>(); }
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>(); }
private void Start() { chStatus = GetComponent <CharacterStatus>(); chAnim = GetComponent <CharacterAnimation>(); navAngent = GetComponent <NavMeshAgent>(); chSkillSys = chStatus.GetComponent <CharacterSkillSystem>(); }
private void Start() { anim = GetComponent <Animator>(); playerStatus = GetComponent <CharaterStatus>(); chMotor = GetComponent <PlayerMotor>(); chMotor.InitMotor(playerStatus); skillSystem = GetComponent <CharacterSkillSystem>(); }
public void Start() { targetPlayer = GameObject.FindGameObjectWithTag("Player").transform; navMeshAgent = GetComponent <NavMeshAgent>(); anim = GetComponent <CharacterAnimation>(); chStatus = GetComponent <CharacterStatus>(); chSystem = GetComponent <CharacterSkillSystem>(); ConfigFSM(); //初始化起始状态 InitDefaultState(); }
public virtual void InitComponent() { //动画机 animator = GetComponentInChildren <Animator> (); //角色数值 characterStatus = GetComponent <CharacterStatus> (); //初始化位置 startPosition = transform.position; //初始化技能管理器 skillSystem = GetComponent <CharacterSkillSystem> (); }
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(); }
private void Awake() { skillSystem = GetComponent <CharacterSkillSystem>(); }
public void Start() { anim = GetComponent <Animator>(); chAnim = transform.parent.GetComponent <CharacterAnimation>(); chSkillSys = transform.parent.GetComponent <CharacterSkillSystem>(); }
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>(); }
// 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> (); }
public void Start() { anim = GetComponentInChildren <Animator>(); chSystem = GetComponent <CharacterSkillSystem>(); }