//public AbilityHyperDash abilityHyperDash;

    // Use this for initialization
    void Start()
    {
        //Physics.gravity = new Vector3 (0, 0, -9.81f);
        anim                  = GetComponent <Animator> ();
        basicMovement         = GetComponent <AbilityBasicMovement> ();
        attackAbility         = GetComponent <AttackAbility> ();
        shieldAbility         = GetComponent <AbilityShield> ();
        dodgeAbility          = GetComponent <AbilityDodgeRoll> ();
        sprintAttackAbility   = GetComponent <AbilitySprintAttack> ();
        chargedAttackAbility  = GetComponent <AbilityChargedAttack> ();
        warpStrikeAbility     = GetComponent <AbilityWarpStrike>();
        grabAbility           = GetComponent <AbilityGrab> ();
        flinchState           = GetComponent <PlayerStateFlinch> ();
        fallState             = GetComponent <AbilityFall> ();
        interactState         = GetComponent <AbilityInteract> ();
        dialogueState         = GetComponent <AbilityDialogue> ();
        hurtInfo              = GetComponent <HurtInfoReceiver> ();
        playerHealthComponent = GetComponent <PlayerHealthComponent>();
        //abilityHyperDash = GetComponent<AbilityHyperDash> ();

        //If Player doesn't exist yet
        if (!playerExists)
        {
            playerExists = true;
            DontDestroyOnLoad(transform.gameObject);
        }
        else
        {
            Destroy(gameObject);
        }

        //Starting state for player
        playerState = PlayerState.Default;
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     this.position          = GetComponent <Transform>().transform.position;
     this.fallPit           = GetComponentInParent <FallPit>();
     this.playerFallHandler = GameObject.Find("Player").GetComponent <AbilityFall>();
 }