Beispiel #1
0
 // 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;
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     princesseAnimator = GameObject.FindGameObjectWithTag("Player").GetComponent <Animator>();
     princesse         = GameObject.FindGameObjectWithTag("Player");
     rb       = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>();
     activate = 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)
    {
        princesse   = GameObject.FindGameObjectWithTag("Player");
        deplacement = princesse.GetComponent <PrincesseDeplacement>();

        deplacement.canMove      = true;
        deplacement.attaqueBegin = false;
    }
Beispiel #4
0
 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()
 {
     deplacement    = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>();
     juliette       = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseObjetProgression> ();
     dicoInventaire = new Dictionary <EnumObjetProgression, GameObject> ();
     // dicoNbObjet = new Dictionary<EnumObjetProgression, int> ();
     affiche  = false;
     instance = this;
 }
    // Use this for initialization
    void Start()
    {
        activePouvoir = false;
        dicoPouvoirGo = new Dictionary <EnumPouvoir, GameObject> ();
        dicoPouvoir   = new Dictionary <EnumPouvoir, PrincessePouvoir> ();
        deplacement   = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>();

        foreach (EnumPouvoirHUD enu in GetComponentsInChildren <EnumPouvoirHUD>(true))
        {
            dicoPouvoirGo.Add(enu.pouvoir, enu.gameObject);
        }
        dicoPouvoir.Add(EnumPouvoir.pouvoirGlace, GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <PrincessePouvoirGlace> (true));
    }
 // Use this for initialization
 void Start()
 {
     //this.duration = icePowerDuration;
     //this.duration = 3f;
     this.Nom         = "Pouvoir de la glace";
     this.Description = "Gèle les ennemis devant vous pendant " + duration + " secondes";
     animator         = GameObject.Find("Juliette").GetComponent <Animator>();
     sphereCollider   = GetComponent <SphereCollider>();
     compteurFrame    = 0;
     running          = false;
     canPower         = true;
     isUnlocked       = false;
     listeAgentGlaces = new List <IA_Agent>();
     Debug.Log(duration);
     deplacement = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>();
 }
    // 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 Awake(){
     *      vie_courante = vie_max;
     *      Debug.Log (vie_courante);
     *
     * }*/


    // Use this for initialization
    void Start()
    {
        princesse   = GameObject.FindGameObjectWithTag("Player");
        deplacement = princesse.GetComponent <PrincesseDeplacement>();

        scene = SceneManager.GetActiveScene();
        // if (scene.name == "Niveau 1") {
        //  GameControl.control.Save ();
        //  vie_courante = vie_max;
        //  GameControl.control.vie = vie_courante;
        // } else {
        vie_courante = GameControl.control.vie;
        // }
        gameover       = false;
        anim           = GetComponent <Animator> ();
        rb             = GetComponent <Rigidbody>();
        sm             = GameObject.FindGameObjectWithTag("SoundManager").GetComponent <SoundManager>();
        CanPlaySonHurt = true;
        hudVie         = GameObject.FindGameObjectWithTag("HUDAffichageVie").GetComponent <AffichageVie> ();
        hudMort        = GameObject.FindGameObjectWithTag("HUDAffichageMort").GetComponent <AffichageMort> ();
        setHudVie();
        PlayOneTimeDie = false;
    }
Beispiel #10
0
    // 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)
    {
        deplacement = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>();
        deplacement.UnlockPrincesse();
    }
 void Start()
 {
     deplacement = GameObject.FindGameObjectWithTag("Player").GetComponent <PrincesseDeplacement>();
 }