Beispiel #1
0
 private void Awake()
 {
     if (playerTag == 2)
     {
         //playerName.text = PlayerPrefs.GetString("Player2Name");
     }
     canDashing      = false;
     canDoubleJump   = false;
     inputController = GetComponent <InputController>();
     controller2D    = GetComponent <Controller2D>();
     anim            = GetComponent <Animator>();
     characterSkill  = GetComponent <CharacterSkill>();
     healthScript    = (HealthScript)FindObjectOfType(typeof(HealthScript));
     isSlowing       = false;
     inputController.OnMovePressed += Move;
     inputController.OnJumpPressed += JumpIfPossible;
     inputController.OnDashPressed += DashIfPossible;
     anim.SetBool("Jump", false);
     anim.SetBool("Idle", false);
     characterSkill.Skill1();
     characterSkill.Skill2();
 }