// 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) { princesseArme = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseArme>(); deplacement = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>(); deplacement.LockPrincesse(); princesseArme.getHandArme().GetComponent <BoxCollider>().enabled = false; }
public override void onAwake() { princesseVie = GetComponent <PrincesseVie>(); princesseArme = GetComponent <PrincesseArme>(); princesseDeplacement = GetComponent <PrincesseDeplacement>(); princessePouvoirGlace = GetComponentInChildren <PrincessePouvoirGlace> (true); princesseObjetProgression = GetComponent <PrincesseObjetProgression>(); cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <camera>(); }
// Use this for initialization void Start() { princesseAnimator = GameObject.FindGameObjectWithTag("Player").GetComponent <Animator>(); princesse = GameObject.FindGameObjectWithTag("Player"); arme = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseArme>(); speed = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>().vitesse; rb = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>(); activate = false; }
protected void init() { agent = this.GetComponent <IA_Agent>(); nav = agent.getNav(); anim = agent.getAnimator(); rb = GetComponent <Rigidbody> (); princesse = agent.getPrincesse(); princesseVie = agent.getPrincesseVie(); princesseArme = agent.getPrincesseArme(); pointsInteret = agent.getPointsInteret(); perception = agent.getPerception(); }
void Awake() { nav = this.GetComponent <NavMeshAgent>(); anim = GetComponent <Animator>(); rb = GetComponent <Rigidbody> (); princesse = GameObject.FindGameObjectWithTag("Player"); princesseVie = princesse.GetComponent <PrincesseVie>(); princesseArme = princesse.GetComponent <PrincesseArme>(); pointsInteret = GameObject.FindObjectsOfType <IA_PointInteret>(); mobVie = GetComponent <IA_MobVie> (); se = GetComponent <SoundEntity> (); me = GameObject.FindGameObjectWithTag("MobManager").GetComponent <MobManager> (); perception = GetComponent <IA_Perception> (); etatCourant = etatInitial; }
// 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) { princesse = GameObject.FindGameObjectWithTag("Player"); cam = GameObject.FindGameObjectWithTag("MainCamera"); deplacement = princesse.GetComponent <PrincesseDeplacement>(); arme = princesse.GetComponent <PrincesseArme>(); anim = princesse.GetComponent <Animator>(); deplacement.attaqueBegin = true; deplacement.canMove = false; anim.SetBool("AttaqueContinu", false); arme.attaqueCorpsACorpsEnCours = !arme.attaqueCorpsACorpsEnCours; //float moveHorizontal = InputManager.GetKeyAxis("Horizontal"); //float moveVertical = InputManager.GetKeyAxis("Vertical"); //princesse.transform.localEulerAngles = new Vector3(0, Mathf.Atan2(moveVertical, -moveHorizontal) * Mathf.Rad2Deg, 0); //princesse.transform.localEulerAngles = new Vector3(0, cam.transform.localEulerAngles.y, 0); //princesse.GetComponent<Rigidbody>().AddForce(princesse.transform.rotation * Vector3.forward * 20, ForceMode.Impulse); }
void Start() { cam = GameObject.FindGameObjectWithTag("MainCamera"); isPushing = false; CanDash = true; rb = GetComponent <Rigidbody>(); anim = GetComponent <Animator>(); princesseArme = GetComponent <PrincesseArme>(); timerStep = 0.0f; sm = GameObject.FindGameObjectWithTag("SoundManager").GetComponent <SoundManager>(); ppg = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincessePouvoirGlace>(); attackjump = false; isCharging = false; canMove = true; canJump = true; canAttack = true; canUsePower = true; canOpenInventory = true; // Gestion Combos attaqueBegin = false; anim.speed = 1; isFin = false; }
// Use this for initialization void Start() { affichageObjetRamasser = GameObject.FindGameObjectWithTag("HUDAffichageObjetRamasser").GetComponent <AffichageObjetRamasser> (); juliette = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseArme> (); soundGenerator = gameObject.GetComponent <SoundEntity>(); }