// Use this for initialization
 void Start()
 {
     this.timer            = 0f;
     this.playerBody       = GetComponent <Rigidbody2D>();
     this.playerCollider   = GetComponent <BoxCollider2D>();
     this.chargedAttack    = GetComponent <AbilityChargedAttack>();
     this.DirectionHandler = new FourDirectionSystem();
     this.playerAttackInfo = GetComponent <AttackInfoContainer>();
     this.spriteRenderer   = GetComponent <SpriteRenderer>();
     this.playerAnim       = GetComponent <Animator>();
     this.warpState        = WarpState.Setup;
 }
 // Use this for initialization
 void Start()
 {
     //playerInfo = GetComponent<PlayerInfoContainer> ();
     movementInfo       = GetComponent <AbilityBasicMovement> ();
     playerAttackInfo   = GetComponent <AttackInfoContainer> ();
     swordCollider      = GameObject.Find("Sword Collider Down").GetComponent <SwordCollider> ();    //Down
     swordColliderUp    = GameObject.Find("Sword Collider Up").GetComponent <SwordCollider> ();
     swordColliderLeft  = GameObject.Find("Sword Collider Left").GetComponent <SwordCollider> ();
     swordColliderRight = GameObject.Find("Sword Collider Right").GetComponent <SwordCollider> ();
     playerBody         = GetComponent <Rigidbody2D> ();
     DirectionHandler   = new FourDirectionSystem();
     playerAnimator     = GetComponent <Animator> ();
 }
    // Use this for initialization
    void Start()
    {
        this.state                = InteractState.Check;
        this.animator             = GetComponent <Animator>();
        this.playerMovementSystem = GetComponent <AbilityBasicMovement>();
        this.playerDialogueState  = GameObject.Find("Player").GetComponent <AbilityDialogue>();
        this.DirectionSystem      = new FourDirectionSystem();
        this.holdItem.enabled     = false;

        this.HPHandler    = GetComponent <PlayerHealthComponent>();
        this.SPHandler    = GetComponent <PlayerSPComponent>();
        this.KeyInventory = GetComponent <PlayerKeyInventory>();
    }
    //NOTE: Will need to add additional collider references for sprint attacks
    // and for the chain attacks if they end up being different

    void Start()
    {
        playerAttackInfo = GetComponent <AttackInfoContainer>();
        swordCollider    = GameObject.Find("Sword Collider Down").GetComponent <SwordCollider>(); //Down
        swordColliderUp  = GameObject.Find("Sword Collider Up").GetComponent <SwordCollider>();
        if (swordColliderUp == null)
        {
            Debug.Log("NULL UP ");
        }
        swordColliderLeft  = GameObject.Find("Sword Collider Left").GetComponent <SwordCollider>();
        swordColliderRight = GameObject.Find("Sword Collider Right").GetComponent <SwordCollider>();

        playerBody = GetComponent <Rigidbody2D>();
        //orientationSystem = GetComponent<OrientationSystem>();
        DirectionHandler = new FourDirectionSystem();
        playerAnimator   = GetComponent <Animator>();
        movementInfo     = GetComponent <AbilityBasicMovement>();
        comboCount       = 0;
        bufferInput      = false;
        chargeAttack     = false;
    }
Beispiel #5
0
    // Use this for initialization
    void Start()
    {
        playerAttackInfo = GetComponent <AttackInfoContainer> ();
        //playerOrientation = GetComponent<PlayerOrientation> ();
        movementInfo   = GetComponent <AbilityBasicMovement> ();
        playerBody     = GetComponent <Rigidbody2D> ();
        spriteRenderer = GetComponent <SpriteRenderer> ();
        animator       = GetComponent <Animator> ();
        //orientationSystem = GetComponent<OrientationSystem> ();
        DirectionHandler  = new FourDirectionSystem();
        chargeAttackState = ChargeAttackState.Setup;

        colliderUp    = GameObject.Find("cAttack Collider Up").GetComponent <SwordCollider> ();
        colliderDown  = GameObject.Find("cAttack Collider Down").GetComponent <SwordCollider> ();
        colliderLeft  = GameObject.Find("cAttack Collider Left").GetComponent <SwordCollider> ();
        colliderRight = GameObject.Find("cAttack Collider Right").GetComponent <SwordCollider> ();

        colliderUp.DisableCollider();
        colliderDown.DisableCollider();
        colliderRight.DisableCollider();
        colliderLeft.DisableCollider();
    }