void Awake()
    {
        input        = GetComponent <PlayerInput>();
        bodyMovement = GetComponent <BodyMovement>();
        dash         = GetComponent <PlayerDash>();

        rayMask  = shieldLayerMask | wallLayerMask;
        comparer = new RaycastHitAscendingDistanceComparer();
    }
Example #2
0
    public void AddBody()
    {
        BodyMovement nextBodyPart = Instantiate(bodyPrototype);

        if (body.Count > 0)
        {
            nextBodyPart.Init(body[body.Count - 1]);
        }
        else
        {
            nextBodyPart.Init(transform);
        }
        nextBodyPart.gameObject.SetActive(true);
        body.Add(
            nextBodyPart.transform
            );
    }
Example #3
0
 void Awake()
 {
     body        = GetComponent <BodyMovement>();
     InputX      = 0.0f;
     JumpPressed = false;
 }
Example #4
0
 void Awake()
 {
     input        = GetComponent <PlayerInput>();
     bodyMovement = GetComponent <BodyMovement>();
     rangedAttack = GetComponent <PlayerRangedAttack>();
 }