Exemplo n.º 1
0
    public override void Initialization(ActCharacterNew character)
    {
        base.Initialization(character);

        _actJump      = character.GetAbility(typeof(ActJump)) as ActJump;
        _actWallCling = character.GetAbility(typeof(ActWallCling)) as ActWallCling;
    }
Exemplo n.º 2
0
    public override void Initialization(ActCharacterNew character)
    {
        base.Initialization(character);

        CurrentLadderClimbingSpeed = Vector2.zero;
        LadderColliding            = false;
        CurrentLadder = null;
    }
Exemplo n.º 3
0
    public virtual void Initialization(ActCharacterNew character)
    {
        _character  = character;
        _platformer = character.platformer;

        _movement           = _character.MovementState;
        _condition          = _character.ConditionState;
        _abilityInitialized = true;
    }
Exemplo n.º 4
0
 protected virtual void AssignTarget(ActCharacterNew pawn)
 {
     Target = pawn.transform;
     if (pawn.platformer == null)
     {
         return;
     }
     TargetController = pawn.platformer;
 }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     InputMdl            = new PlayerInput();
     InputMdl.controller = this;
     Pawn            = GetComponent <ActCharacterNew>();
     Pawn.controller = this;
     Pawn.Init();
     cameraCtrl = Camera.main.GetComponent <CameraController>();
     cameraCtrl.Init(this);
 }
Exemplo n.º 6
0
    protected virtual void OnTriggerEnter2D(Collider2D collider)
    {
        // we check that the object colliding with the ladder is actually a corgi controller and a character
        ActCharacterNew actChar = collider.GetComponent <ActCharacterNew>();

        if (actChar == null || actChar.GetAbility(typeof(ActClimbing)) == null)
        {
            return;
        }
        ActClimbing actClimbing = actChar.GetAbility(typeof(ActClimbing)) as ActClimbing;

        actClimbing.LadderColliding = true;
        actClimbing.CurrentLadder   = this;
    }
Exemplo n.º 7
0
    /// <summary>
    /// Triggered when something exits the ladder
    /// </summary>
    /// <param name="collider">Something colliding with the ladder.</param>
    protected virtual void OnTriggerExit2D(Collider2D collider)
    {
        // we check that the object colliding with the ladder is actually a corgi controller and a character
        ActCharacterNew actChar = collider.GetComponent <ActCharacterNew>();

        if (actChar == null || actChar.GetAbility(typeof(ActClimbing)) == null)
        {
            return;
        }
        ActClimbing actClimbing = actChar.GetAbility(typeof(ActClimbing)) as ActClimbing;

        // when the character is not colliding with the ladder anymore, we reset its various ladder related states
        actClimbing.LadderColliding = false;
        actClimbing.CurrentLadder   = null;
    }
Exemplo n.º 8
0
    public virtual void OnTriggerEnter2D(Collider2D collider)
    {
        ActCharacterNew c = collider.gameObject.GetComponent <ActCharacterNew>();

        if (c == null)
        {
            return;
        }
        ActGrip grip = c.GetAbility(typeof(ActGrip)) as ActGrip;

        if (grip == null)
        {
            return;
        }
        grip.StartGripping(this);
    }
Exemplo n.º 9
0
    //protected float _slopeAngleSave



    public override void Initialization(ActCharacterNew character)
    {
        base.Initialization(character);
    }
Exemplo n.º 10
0
 public override void Initialization(ActCharacterNew character)
 {
     base.Initialization(character);
     InTunnel        = false;
     CrawlAuthorized = true;
 }