Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     myControllerInputs = this.gameObject.GetComponent <controllerInputs>();
     myAnimator         = this.gameObject.GetComponent <Animator>();
     effectAnimator     = this.transform.GetChild(1).GetComponent <Animator>();
     myAudioManager     = this.gameObject.GetComponent <AudioManager>();
     myAttackSystem     = this.gameObject.GetComponent <attackSystem>();
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     if (this.tag == "1")
     {
         mySystem = gameStart.player1Object.GetComponent <attackSystem>();
         Debug.Log(mySystem.tag);
     }
     else if (this.tag == "2")
     {
         mySystem = gameStart.player2Object.GetComponent <attackSystem>();
         Debug.Log(mySystem.tag);
     }
 }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        float a = transform.lossyScale.x;

        guaiwalk     = GetComponent <CharacterController> ();
        anim         = GetComponent <Animator> ();
        t            = GameObject.FindWithTag("Player");
        playerAnim   = t.GetComponent <Animator> ();
        playerAttack = t.GetComponent <attackSystem> ();
        anim.SetBool("death", false);
        anim.SetBool("idle", true);
        anim.SetInteger("attack", -1);
        attackDistance += a * 1.5f - 1.5f;
        attackPoint    *= a;
        hp             *= a;
    }
Ejemplo n.º 4
0
 // Start is called before the first frame update
 void Awake()
 {
     otherPlayer  = this.gameObject.tag == "1" ? 2 : 1;
     parentObject = this.transform.GetComponentInParent <attackSystem>();
 }