Beispiel #1
0
    private void Awake()
    {
        m_Rigidbody2D = GetComponent <Rigidbody2D>();

        if (onLandEvent == null)
        {
            onLandEvent = new UnityEvent();
        }

        if (onCrouchEvent == null)
        {
            onCrouchEvent = new boolEvent();
        }
    }
Beispiel #2
0
    void Start()
    {
        healthAmount = 1;

        m_vitesse              = 3f;
        forceDeSaut            = 10f;
        myRB                   = this.GetComponent <Rigidbody2D>();
        crouchColliderDisabler = this.GetComponent <BoxCollider2D>();

        myTrans     = this.transform;
        groundCheck = GameObject.Find(this.name + "/GroundCheck").transform;

        if (onLandEvent == null)
        {
            onLandEvent = new UnityEvent();
        }
        if (onCrouchEvent == null)
        {
            onCrouchEvent = new boolEvent();
        }
    }