void Start() { attackMode = GetComponentInParent <CheaserAnimationPoton>(); Collider = this.GetComponent <BoxCollider>(); attackAni = GetComponentInParent <Animator>(); isCollisionOk = false; }
void Awake() { chSkillButton1 = GameObject.FindWithTag("CheaserSkillUiButton"); chSkillButton2 = GameObject.FindWithTag("CheaserSkillUiButton2").GetComponent <ChSkillButton2>(); chSkillButton3 = GameObject.FindWithTag("CheaserSkillUiButton3").GetComponent <Skill3Button>(); joyStick = GameObject.Find("Joystick").GetComponent <NGUIJoystick>(); characterSpeed = GameObject.Find("Cheaser").GetComponent <CheaserMoveCamera>(); playerOutLine = GameObject.FindGameObjectWithTag("Player").GetComponent <Outline>(); cheaserAttackButton = GameObject.FindWithTag("CheaserAttackButton").GetComponent <CheaserHitBButton>(); potalCollider = GameObject.FindWithTag("PotalCollision").GetComponent <PotalCollider>(); cheaserAni = this.GetComponent <CheaserAnimationPoton>(); cheaserRay = new Ray(); crow2Navi = GameObject.FindWithTag("Crow2").GetComponent <CrowNavi>(); attackUiLabel = GameObject.FindWithTag("CheaserAttackButton").GetComponentInChildren <UILabel>(); animator = GetComponent <Animator>(); }
private void Start() { myRigid = GetComponent <Rigidbody>(); agent = GetComponent <NavMeshAgent>(); originTrans = GetComponent <Transform>(); originTrans = cheaserCrow2trans; cheaserAniScript = GameObject.FindWithTag("Cheaser").GetComponent <CheaserAnimationPoton>(); cheaserAttackMode = GameObject.FindWithTag("Cheaser").GetComponent <CheaserAttackMode>(); agent.enabled = false; // +1 은 오리지널 포지션 값 wayPoints = new Vector3[tf_Destination.Length + 1]; for (int i = 0; i < tf_Destination.Length; i++) { wayPoints[i] = tf_Destination[i].position; } wayPoints[wayPoints.Length - 1] = transform.position; // 상태값 초기화 crowStatus = CrowStatus.WAIT; isFind = false; }