Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        Stats = GameObject.FindObjectOfType <GiovanniStats>();

        rb2d = GetComponent <Rigidbody2D>();
        rb2d.freezeRotation = true;

        animator = GetComponent <Animator>();

        facingRight = true;


        moveSpeedDash = Stats.moveSpeed + 10;

        maxFe     = Stats.fe;
        currentFe = maxFe;

        crossOut = false;
        //crossOut = false;

        moveUp    = false;
        moveDown  = false;
        moveRight = false;
        moveLeft  = false;

        //Sounds
        AudioSource[] audios = GetComponents <AudioSource>();
        respirar = audios[0];
        caminar  = audios[1];
        atacar   = audios[2];
        morir    = audios[3];
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        rb2d = GetComponent <Rigidbody2D>();
        rb2d.freezeRotation = true;
        spriterender        = GetComponent <SpriteRenderer>();
        x = transform.position.x;
        y = transform.position.y;


        giovannicontrol = GameObject.FindObjectOfType <GiovanniControl>();
        giovannistats   = GameObject.FindObjectOfType <GiovanniStats>();
        animator        = GetComponent <Animator>();

        target   = GameObject.FindGameObjectWithTag("Player").transform;
        obstacle = GameObject.FindGameObjectWithTag("Obstacle").transform;

        beenAttacked = false;
        facingRight  = true;
    }
Exemplo n.º 3
0
 private void Awake()
 {
     giovannistats   = GameObject.FindObjectOfType <GiovanniStats>();
     giovannicontrol = GameObject.FindObjectOfType <GiovanniControl>();
 }
Exemplo n.º 4
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)
    {
        giovanni = GameObject.FindObjectOfType <GiovanniStats>();

        giovanni.isDead = true;
    }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     giovannicontrol = GameObject.FindObjectOfType <GiovanniControl>();
     giovannistats   = GameObject.FindObjectOfType <GiovanniStats>();
 }