Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     _myRigidBody  = GetComponent <Rigidbody2D>();
     _jump         = GetComponent <Jump>();
     _character    = GetComponent <Character>();
     _grabAndCarry = GetComponent <GrabAndCarry>();
     _animator     = GetComponent <Animator>();
 }
Ejemplo n.º 2
0
    /// <summary>
    /// The routine to run on Awake().
    /// </summary>
    protected virtual void awakeRoutine()
    {
        _character    = GetComponent <Character>();
        _grabAndCarry = _character.GetComponent <GrabAndCarry>();

        if (!_grabAndCarry)
        {
            Destroy(this);
        }
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        _rigidbody    = GetComponent <Rigidbody2D>();
        _character    = GetComponent <Character>();
        _grabAndCarry = GetComponent <GrabAndCarry>();

        _initialGravityScale = _rigidbody.gravityScale;
        _initialPhysicsLayer = this.gameObject.layer;

        ladderLayer = LayerMask.NameToLayer("Ladder");
    }