protected override void OnStart()
        {
            base.OnStart();
            XSpaceManager.Instance.Space.SetGravity(new cpVect(0.0f, -Parameters.Gravity));
            mPlayerBody  = GetComponent <XRigidbody2D>().Rigidbody2D;
            mPlayerShape = GetComponent <XCollider2D>().Collider2D;
            mPlayerBody.SetVelocityUpdateFunc(PlayerUpdateVelocity);

            mCharacter = GetComponent <XCharacter>();
        }
예제 #2
0
 protected virtual void Init()
 {
     mCharacter      = GetComponent <XCharacter>();
     mController     = GetComponent <XController>();
     mSpriteRenderer = GetComponent <SpriteRenderer>();
 }