public override void OnDestroy()
    {
        _camera = null;

        _inputer = null;

        _motioner = null;
    }
    public override void Init(object parameters)
    {
        base.Init(parameters);

        _inputer = CharacterInputController.Instance;

        _motioner = this.stateMachine.motionController;

        _camera = _motioner.cameraController;
    }
    public override void UnInit()
    {
        _motioner = null;

        _montionAttr = null;

        _inputer = null;

        _camera = null;
    }
예제 #4
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        // If player
        if (other.tag == "Player" &&
            (InputManager.Jump()) ||
            (other.GetComponent <CharacterMotionController>().ContMotionVector.y < -1f) && !InputManager.HoldingDown())
        {
            // Apply impluse
            skeletonAnimation.AnimationState.SetAnimation(0, "Jump", false);
            skeletonAnimation.AnimationState.AddAnimation(0, "Idle", true, 0);
            otherMC = other.GetComponent <CharacterMotionController>();
            otherMC.DoImpulse(Vector2.up * Velocity);

            // Invoke event
            OnBounce.Invoke();

            // timer
            timeSinceLastActivation = 0;
        }
    }
예제 #5
0
 private void Awake()
 {
     mc = GetComponent <CharacterMotionController>();
 }
예제 #6
0
 private void Awake()
 {
     chr     = GetComponent <BaseController>();
     mc      = GetComponent <CharacterMotionController>();
     Hurtbox = GetComponent <Hurtbox>();
 }
 public override void OnDestroy()
 {
     _motioner = null;
 }
    public override void Init(object parameters)
    {
        base.Init(parameters);

        _motioner = stateMachine.motionController;
    }
예제 #9
0
 protected virtual void Awake()
 {
     mc  = GetComponent <CharacterMotionController>();
     _an = GetComponent <AnimationController>();
 }