void Awake() { floorMask = LayerMask.GetMask("Floor"); anim = GetComponent<Animator>(); pRigidBody = GetComponent<Rigidbody>(); }
// Use this for initialization void Start() { for (int i = 0; i < this.transform.childCount; i++) { GameObject obj = this.transform.GetChild(i).gameObject; Animator animator = obj.GetComponentInChildren<Animator>(); this.animatorList.Add(animator); obj.SetActive(false); } switch (showType) { case ShowType.Enumeration: { for(int i = 0; i < animatorList.Count; i++){ GameObject obj = animatorList[i].transform.parent.gameObject; obj.SetActive(true); float x = -20 + (i / 5) * 5; float y = 10 - (i % 5) * 5; Vector3 pos = new Vector3(x, y, i); obj.transform.localPosition = pos; } break; } case ShowType.Queue: { if(animatorList.Count >= 1){ currentAnimator = animatorList[0]; GameObject obj = currentAnimator.transform.parent.gameObject; obj.SetActive(true); } break; } } }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if(animator.gameObject.GetComponent<Enemy>().indexPos == 0){ if(animator.GetInteger("attack") == 1){ GameObject EarthBend = (GameObject)Instantiate(Resources.Load("EarthBend", typeof(GameObject)), GameObject.Find("skillSpawn(1)").transform.position, GameObject.Find("skillSpawn(1)").transform.rotation); EarthBend.GetComponent<Rigidbody>().velocity = EarthBend.transform.TransformDirection(Vector3.forward * 15); EarthBend.transform.FindChild("source").gameObject.tag = "Enemy1Attack"; } } if(animator.gameObject.GetComponent<Enemy>().indexPos == 1){ if(animator.GetInteger("attack") == 1){ GameObject EarthBend = (GameObject)Instantiate(Resources.Load("EarthBend", typeof(GameObject)), GameObject.Find("skillSpawn(2)").transform.position, GameObject.Find("skillSpawn(2)").transform.rotation); EarthBend.GetComponent<Rigidbody>().velocity = EarthBend.transform.TransformDirection(Vector3.forward * 15); EarthBend.transform.FindChild("source").gameObject.tag = "Enemy2Attack"; } } if(animator.gameObject.GetComponent<Enemy>().indexPos == 2){ if(animator.GetInteger("attack") == 1){ GameObject EarthBend = (GameObject)Instantiate(Resources.Load("EarthBend", typeof(GameObject)), GameObject.Find("skillSpawn(3)").transform.position, GameObject.Find("skillSpawn(3)").transform.rotation); EarthBend.GetComponent<Rigidbody>().velocity = EarthBend.transform.TransformDirection(Vector3.forward * 15); EarthBend.transform.FindChild("source").gameObject.tag = "Enemy3Attack"; } } }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); anim = GetComponent<Animator>(); charControl = GetComponent<CharacterController>(); }
void Start() { _t = transform; _animator = GetComponent<Animator>(); _controller = GetComponent<CharacterController>(); _rigidbody = GetComponent<Rigidbody>(); }
void Start () { //Border for the submarine. used for movement restriction screenRatio = (float)Screen.width / (float)Screen.height; widthOrtho = Camera.main.orthographicSize * screenRatio; subBoundaryRadius = 1f; //Initalize hp hp = HP_MAX; //Set player speed speed = 3.0f; //Initalize ability cool down time boostDuration = BOOST_TIME; itemBoost = false; //Initalize virus cool down time virusDuration = VIRUS_TIME; virusBoost = false; //Screen flash when player is hit hit = GameObject.FindWithTag ("flash"); hit.GetComponentInChildren<RawImage>().enabled = false; //Get Animator playerAnimation = GetComponent<Animator>(); }
void Start() { animator = GetComponent<Animator>(); status = GetComponent<CharacterStatus>(); prePosition = transform.position; }
// Use this for initialization void Start() { animator = GetComponent<Animator>(); animator.Play("DayNight", -1, Game.CurrentTime / 24f); animator.speed = 0f; }
void Start(){ player = GameObject.FindGameObjectWithTag ("Player").transform; playerAtkAndDamge = player.GetComponent<PlayerATKAndDamage> (); cc = this.GetComponent<CharacterController> (); animator = this.GetComponent<Animator> (); attackTimer = attackTime; }
void AssignReferences() { myCollider = GetComponent<Collider2D>(); myCollider.isTrigger = true; animator = GetComponent<Animator>(); }
void Start() { mobGun = GameObject.Find("mobGun"); anim = GetComponent<Animator>(); agent = GetComponent<NavMeshAgent>(); player = GameObject.Find("Player"); }
// Use this for initialization void Start() { rigid = GetComponent<Rigidbody2D>(); box = GetComponent<BoxCollider2D>(); esperando = espera; anim = GetComponent<Animator>(); }
void Awake() { rb2d = GetComponent<Rigidbody2D>(); anim = GetComponent<Animator>(); aud = GetComponent<AudioSource>(); jps = transform.GetChild(2).GetComponent<ParticleSystem>(); }
protected void Start() { // get the Animator m_animator = gameObject.GetComponent<Animator>(); m_initialRotation = transform.localRotation; m_initialPosition = transform.localPosition; }
// Use this for initialization void Start() { this.player = PlayerController.instance; this.rb2d = this.GetComponent<Rigidbody2D> (); this.melee = this.GetComponent<MeleeAttacker> (); this.animator = this.GetComponent<Animator> (); }
// Use this for initialization void Start() { startPos = transform.position; rigidbody2D.velocity = new Vector3(0, force, 0); anim = gameObject.GetComponent<Animator>(); timer = 0; }
void OnLevelWasLoaded(int level) { //opens eyes at the start of every level animator = this.GetComponent<Animator> (); animator.SetBool ("Open", true); eyesOpen = true; }
void Awake() { inventory = GameObject.FindGameObjectWithTag("Inventory").GetComponent<Inventory>(); controller = gameObject.GetComponent("CharacterController") as CharacterController; animator = GetComponent<Animator>(); canAttack = true; }
// Use this for initialization void Start() { anim = GetComponent<Animator> (); cameraObj = GameObject.FindGameObjectWithTag("MainCamera"); cameraScript = cameraObj.GetComponent<CameraScript>(); anim.SetBool ("is2DMode", false); }
void Awake(){ audio = this.gameObject.AddComponent<AudioSource>(); audio.playOnAwake = false; audio.loop = false; my_transform = this.gameObject.GetComponent<Transform> (); move_enemy = my_transform.Find ("ob"); if(move_enemy == null){ Debug.Log("move_enemy is null"); } player = move_enemy.Find("fast_move_enemy").gameObject.GetComponent<Animator>(); up_check = my_transform.Find ("up_check"); down_check = my_transform.Find ("down_check"); left_check = my_transform.Find ("left_check"); right_check = my_transform.Find ("right_check"); if (stand_direction == 1) { player.CrossFade ("stand", 0); } else if (stand_direction == 2) { player.CrossFade ("down",0); }else if (stand_direction == 3) { player.CrossFade ("left_stand",0); }else if (stand_direction == 4) { player.CrossFade ("right_stand",0); } }
void Start() { animator = GameObject.Find("Player").GetComponent<Animator>(); if (!animator) { Debug.LogError("Missing animator!"); } basePlayer = GameObject.Find("Player").GetComponent<BasePlayer>(); if (!basePlayer) { Debug.LogError("Missing BasePlayer script!"); } audioSource = GameObject.Find("Player").GetComponent<AudioSource>(); if (!audioSource) { Debug.LogError("Missing audio source!"); } if (!cooldownIndicator) { Debug.LogError("Missing cooldown button!"); } if (clip.Length == 0) { Debug.LogError("0 sounds for attacking!"); } timer = 0f; targets = new List<BaseNPC>(); attacking = false; }
void Awake() { anim = GetComponent <Animator> (); playerAudio = GetComponent <AudioSource> (); playerMovement = GetComponent <PlayerMovement> (); currentHealth = startingHealth; }
// Use this for initialization void Start () { //Get a component reference to the Character's animator component animator = GetComponent<Animator>(); render = GetComponent<SpriteRenderer>(); //Get the rigid body on the prefab bullBody = GetComponent<Rigidbody2D>(); //Set our bullet strength and speed strength = 4; speed = 40; //Go after our player! player = GameObject.Find("Player").GetComponent<Player>(); //Get our Player current Direction if (player.getDirection () > 0 || (player.getDirection() == 0 && player.getLastDirection() > 0 )) { animator.SetInteger ("Direction", 1); playerRight = true; } else { playerRight = false; animator.SetInteger ("Direction", -1); } //Play our shooting sound shoot = GameObject.Find ("Shoot").GetComponent<AudioSource> (); shoot.Play (); //Get our camera script actionCamera = Camera.main.GetComponent<ActionCamera>(); }
// Use this for initialization void Start () { Screen.autorotateToPortrait = false; Screen.autorotateToPortraitUpsideDown = false; animator = GetComponent<Animator>(); forwardMovementSpeed = initialForwardMovementSpeed; Debug.Assert(social != null && leaderboards != null); }
// Use this for initialization void Start () { rbd2D = GetComponent<Rigidbody2D> (); anim = GetComponent<Animator> (); aL = (Arrow_Launch)FindObjectOfType (typeof(Arrow_Launch)); directEnemy = (Enemy_Controller)FindObjectOfType (typeof(Enemy_Controller)); pStatus = (Player_Status)FindObjectOfType (typeof(Player_Status)); }
void Start () { this.anim1 = this.conversante1.GetComponent<Animator> (); this.anim2 = this.conversante2.GetComponent<Animator> (); this.texto = GameObject.Find ("Dialogo").GetComponent<Text> (); TextAsset archivo = Resources.Load(this.fichero) as TextAsset; this.contenidoFichero = archivo.text; this.conversaciones = this.contenidoFichero.Split ('\n'); this.numConver = 0; this.primeraConversacion = true; this.siguienteConversacion = false; this.audioActual = this.gameObject.GetComponent<AudioSource> (); //Inicializamos el clip del audio. this.audioActual.clip = this.audio1; //Registramos la informacion del Analytics if (Tracker.T () != null) { this.registrarTracker (); } if (this.fichero == "Transicion1") this.anim2.SetBool("contenta", false); }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { // //} // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { // //} // OnStateExit is called when a transition ends and the state machine finishes evaluating this state override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { if(stateInfo.IsName("LongGunPullOut")) { animator.GetComponent<CharacterReference>().ParentCharacter.MyAnimEventHandler.TriggerOnLongGunPullOutFinish(); } else if(stateInfo.IsName("SmallWeaponPullOut")) { animator.GetComponent<CharacterReference>().ParentCharacter.MyAnimEventHandler.TriggerOnPistolPullOutFinish(); } else if(stateInfo.IsName("LongGunPutAway")) { animator.GetComponent<CharacterReference>().ParentCharacter.MyAnimEventHandler.TriggerOnLongGunPutAwayFinish(); } else if(stateInfo.IsName("SmallWeaponPutAway")) { animator.GetComponent<CharacterReference>().ParentCharacter.MyAnimEventHandler.TriggerOnPistolPutAwayFinish(); } else if(stateInfo.IsName("GrenadePullOut")) { animator.GetComponent<CharacterReference>().ParentCharacter.MyAnimEventHandler.TriggerOnGrenadePullOutFinish(); } else if(stateInfo.IsName("MeleeDraw")) { animator.GetComponent<CharacterReference>().ParentCharacter.MyAnimEventHandler.TriggerOnMeleePullOutFinish(); } }
void Awake() { this.steering = this.gameObject.GetComponent<SteeringController>(); this.animator = this.gameObject.GetComponent<Animator>(); this.ik = this.animator.GetComponent<IKController>(); this.RegisterWithIK(); }
// Use this for initialization void Start () { animator = transform.GetComponentInChildren<Animator>(); if(animator == null) { Debug.LogError("Didn't find animator!"); } }
//private float jumpVector = 0.5f; //factor needed in relation to vertical moving platforms void Awake() { anim = GetComponent<Animator> (); _speed = GetComponent<Boar_AI2> ().speed; _agroSpeed = GetComponent<Boar_AI2> ().agroSpeed; tempScale = new Vector3 (1, 1, 1); }
void FSM.patrolState(Animator animator) { Debug.LogError("Patrolling now"); }
public override void OnSLStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { m_MonoBehaviour.TeleportToColliderBottom(); }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { // if (PlayerPrefs.GetInt("FirstCollectable", 0) == 0) // { // PlayerPrefs.SetInt("FirstCollectable", 1); ItemPromptManager.DisplayPrompt(18, -1, null, null, null, false, false); // } this.gameObject.GetComponent <Collider>().enabled = false; animator = this.GetComponent <Animator>(); animator.SetBool("Activate", true); if (GameObject.Find("Collectables") != null && GameObject.Find("Collectables").GetComponent <ActivateItemsExtra>() != null) { scriptcollectables = GameObject.Find("Collectables").GetComponent <ActivateItemsExtra>(); if (nameobj == "marmellade1") { scriptcollectables.marmellade1obj.SetActive(true); PlayerPrefs.SetInt("marmellade1", 1); } if (nameobj == "marmellade2") { scriptcollectables.marmellade2obj.SetActive(true); PlayerPrefs.SetInt("marmellade2", 1); } if (nameobj == "marmellade3") { scriptcollectables.marmellade3obj.SetActive(true); PlayerPrefs.SetInt("marmellade3", 1); } if (nameobj == "plantjar") { scriptcollectables.plantjarobj.SetActive(true); PlayerPrefs.SetInt("plantjar", 1); } if (nameobj == "plantjar2") { scriptcollectables.plantjar2obj.SetActive(true); PlayerPrefs.SetInt("plantjar2", 1); } if (nameobj == "book1") { scriptcollectables.book1obj.SetActive(true); PlayerPrefs.SetInt("book1", 1); } if (nameobj == "book2") { scriptcollectables.book2obj.SetActive(true); PlayerPrefs.SetInt("book2", 1); } if (nameobj == "book3") { scriptcollectables.book3obj.SetActive(true); PlayerPrefs.SetInt("book3", 1); } if (nameobj == "paint") { scriptcollectables.paint1obj.SetActive(true); PlayerPrefs.SetInt("paint", 1); } if (nameobj == "paint2") { scriptcollectables.paint2obj.SetActive(true); PlayerPrefs.SetInt("paint2", 1); } if (nameobj == "gameboy") { scriptcollectables.gameboyobj.SetActive(true); PlayerPrefs.SetInt("gameboy", 1); } if (nameobj == "bell") { scriptcollectables.bellobj.SetActive(true); PlayerPrefs.SetInt("bell", 1); } if (nameobj == "heater") { scriptcollectables.heaterobj.SetActive(true); PlayerPrefs.SetInt("heater", 1); } if (nameobj == "globe") { scriptcollectables.globjeobj.SetActive(true); PlayerPrefs.SetInt("globe", 1); } if (nameobj == "cupbear") { scriptcollectables.cupbearobj.SetActive(true); PlayerPrefs.SetInt("cupbear", 1); } if (nameobj == "compass") { scriptcollectables.compassobj.SetActive(true); PlayerPrefs.SetInt("compass", 1); } if (nameobj == "carpet") { scriptcollectables.carpetobj.SetActive(true); PlayerPrefs.SetInt("carpet", 1); } if (nameobj == "candle") { scriptcollectables.candleobj.SetActive(true); PlayerPrefs.SetInt("candle", 1); } if (nameobj == "statue1") { scriptcollectables.statue1obj.SetActive(true); PlayerPrefs.SetInt("statue1", 1); } if (nameobj == "statue2") { scriptcollectables.statue2obj.SetActive(true); PlayerPrefs.SetInt("statue2", 1); } if (nameobj == "statue3") { scriptcollectables.statue3obj.SetActive(true); PlayerPrefs.SetInt("statue3", 1); } if (nameobj == "mask1") { scriptcollectables.mask1obj.SetActive(true); PlayerPrefs.SetInt("mask1", 1); } if (nameobj == "mask2") { scriptcollectables.mask2obj.SetActive(true); PlayerPrefs.SetInt("mask2", 1); } if (nameobj == "mask3") { scriptcollectables.mask3obj.SetActive(true); PlayerPrefs.SetInt("mask3", 1); } if (nameobj == "map") { scriptcollectables.mapobj.SetActive(true); PlayerPrefs.SetInt("map", 1); } if (nameobj == "jukebox") { scriptcollectables.jukeboxobj.SetActive(true); PlayerPrefs.SetInt("jukebox", 1); } if (nameobj == "inbox") { scriptcollectables.inboxobj.SetActive(true); PlayerPrefs.SetInt("inbox", 1); } if (!PlayerPrefs.HasKey("CollectablesTotal")) { PlayerPrefs.SetInt("CollectablesTotal", 0); } PlayerPrefs.SetInt("CollectablesTotal", PlayerPrefs.GetInt("CollectablesTotal", 0) + 1); other.gameObject.GetComponent <TPC>().itemText.text = PlayerPrefs.GetInt("CollectablesTotal").ToString(); other.gameObject.GetComponent <TPC>().ps.SetCollectables(); // PlayerPrefs.Save(); StartCoroutine(WaitToDeact()); } } }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { GameObject.FindGameObjectWithTag("Player").GetComponent <Score>().score += 200; GameObject.FindGameObjectWithTag("Player").GetComponent <Score>().coins += 1; }
// Start is called before the first frame update void Start() { isNear = false; animator = transform.parent.GetComponent<Animator>(); }
public PlayerStateMidAttack(Animator animator) : base(animator) { }
private bool PoSui_DiMian = false; //地面 #endregion #region ---------调用方法---------- public void Init() { GameObject go2 = GameObject.Find("SA_INT"); GameObject go = UtilFunction.ResourceLoad("Prefabs/WSM/Level05GameObjectManager"); playerGO = GameObject.Find("ThirdPersonController"); //TODO FreeLookCameraRig = GameObject.Find("FreeLookCameraRig").transform; m_FreeLookCam = FreeLookCameraRig.GetComponent <FreeLookCam>(); m_ProtectCameraFromWallClip = FreeLookCameraRig.GetComponent <ProtectCameraFromWallClip>(); PlayerPositions = new Transform[go.transform.Find("PlayerPosition").childCount]; for (int i = 0; i < PlayerPositions.Length; i++) { PlayerPositions[i] = go.transform.Find("PlayerPosition").GetChild(i); } TaskPosition = new Transform[go.transform.Find("Task").childCount]; for (int i = 0; i < TaskPosition.Length; i++) { TaskPosition[i] = go.transform.Find("Task").GetChild(i); } //楼梯 LouTi_5_1_PoSui = go2.transform.Find("SA_Exterior_5/EX_5A_Indoor/EX_5B_Indoor_4F/EX_5B_4F_Stairs/EX_5A_4F_Stairs_B/F4_Stairs_Collision").gameObject; LouTi_5_1_PoSuiAnimator = LouTi_5_1_PoSui.GetComponent <Animator>(); LouTi_5_1_Collider = go2.transform.Find("WALL_Collider/4F/Stairs/PoSuiTiZi").gameObject; LouTi_5_1_Model = GameObject.Find("LoTi_5_1"); //LouTi_5_1_Collider = go.transform.Find("LouTi_5_1_Collider").gameObject; DiBan_F5_4PlSun = go2.transform.Find("SA_Exterior_5/EX_5A_Indoor/EX_5B_Indoor_5F/EX_5B_5F_Floor/F5_Floor_Collision").gameObject; DiBan_F5_4Animator = DiBan_F5_4PlSun.GetComponent <Animator>(); //地板 //DiBan_F5_4_Model = GameObject.Find("EX_5B_5F_Floor1"); DiBan_F5_4_Collider = go.transform.Find("LouTi_5_1_Collider").gameObject; TiZi_F5_25_Model = GameObject.Find("LouTi_1"); TiZi_F5_25_Collider_Ground = GameObject.Find("F5_25_Ground"); TiZi_F5_25_Collider_Wall = GameObject.Find("F5_25_Wall"); Radio_GameObject = go.transform.Find("Radio").gameObject; Radio_Script = Radio_GameObject.GetComponent <Level5_Radio>(); Radio_Script.Init(); F5_16Zomeber = go.transform.Find("Enemy/F5_16_Zomber").gameObject; F5_16ZomeberScript = F5_16Zomeber.GetComponent <Zomber_F5_16>(); F5_16ZomeberScript.Init(); F5_6_Zomber = go.transform.Find("Enemy/F5_06_Zomber").gameObject; F5_6_Zomber_Script = F5_6_Zomber.GetComponent <Zomber_5F_6>(); F5_13_Zomber = go.transform.Find("Enemy/F5_13_Zomber").gameObject; F5_13_Zomber_Script = F5_13_Zomber.GetComponent <Zomber_5F_6>(); LianTiao = go.transform.Find("WanZhengSuoLian").gameObject; JuanLianMen = GameObject.Find("EX_5B_5F_Curtain_2"); X_Window = GameObject.Find("EX_5B_5F_Window_2"); X_WindowScript = X_Window.GetComponent <OpenDoor_WSM>(); JayceeMonster_TiZi = go.transform.Find("Enemy/JayceeBoss_2").gameObject; JayceeMonster_TiZi_Script = JayceeMonster_TiZi.GetComponent <Level_05_JayceeBoss_2>(); JayceeMonster_TiZi.SetActive(false); F5_21_Hint = GameObject.Find("F5_21_Hint"); Show_F5_21_Hint(false); CanLevel5 = true; }
private void Start() { _rigidbody = GetComponent <Rigidbody2D>(); _animator = GetComponent <Animator>(); _renderer = GetComponent <SpriteRenderer>(); }
// Use this for initialization private void Start () { animator = GetComponent<Animator> (); rgdbody2 = GetComponent<Rigidbody2D> (); }
// Use this for initialization void Start() { anim = GetComponent <Animator>(); }
protected override bool SmallFireAction(Animator animator) { smallCooldown = smallBaseCooldown; playerAnimator = animator; return true; }
void Start() { animator = GetComponent <Animator>(); projectilesParent = GameObject.Find("Projectiles"); bulletAmount = 1; }
public override void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { animator.transform.position = animator.GetComponent <PlayerController>().Position; }
protected override bool BigFireAction(Animator animator) { bigCooldown = bigBaseCooldown; playerAnimator = animator; return true; }
void Start() { player_anim = GetComponent <Animator>(); sprRend = GetComponent <SpriteRenderer>(); }
void Start () { direction = GetComponent<PlayerMovement>().direction; swordAnim = transform.GetChild(0).GetComponent<Animator>(); }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { // //} // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { }
void Awake() { _Animator = GetComponent <Animator>(); }
// OnStateEnter is called when a transition starts and the state machine starts to evaluate this state override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { time = 0; }
void Awake() { // get the controllers m_controller = GetComponent <CharacterController>(); m_animationController = GetComponent <Animator>(); }
private void Awake() { _animator = GetComponent<Animator>(); }
void Awake() { myBody2D = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); }
public void chaseState(Animator animator) { b.currentState = b.chaseState; }
private void Start() { var transitionInScreen = Instantiate(objectWithTransition); transition = transitionInScreen.GetComponentInChildren <Animator>(); }
// OnStateExit is called when a transition ends and the state machine finishes evaluating this state override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { animator.ResetTrigger("MoveChain"); }
public void attackState(Animator animator) { b.navMeshAgent.speed = 2; b.currentState = b.attackState; }
// Use this for initialization void Start() { a = GetComponent <Animator> (); yin = GetComponent <AudioSource> (); }
public void updateState(Animator animator) { Watch(animator); Patrol(); }
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { storkBoss = animator.GetComponent <StorkBossMainScript>(); }
void Start() { // Atribui o alvo a ser perseguido alvo = GameObject.FindGameObjectWithTag("Player"); animator = GetComponent <Animator> (); }