Example #1
0
 public void Inject(PlayerUnitDI di)
 {
     controller = di.controller;
     action     = di.abilities.action;
     action.OnIsAttackingChange += OnIsAttackingChange;
     OnIsAttackingChange(false);
 }
    public void Inject(PlayerUnitDI di)
    {
        stateMachine = di.stateMachine;

        PlayerAbilities abilities = di.abilities;

        selectUnit = abilities.selectUnit;
        movement   = abilities.movement;
        jump       = abilities.jump;
        wallSlide  = abilities.wallSlide;
        yeet       = abilities.yeet;
        action     = abilities.action;
        physics    = di.physics;

        this.abilities = new IPlayerAbility[] {
            action,
            selectUnit,
            yeet,
            wallSlide,
            movement,
            jump
        };
    }
 public void Inject(PlayerUnitDI di)
 {
     unitHandler = di.mainDi.unitHandler;
     input       = di.mainDi.controller.input;
     action      = di.abilities.action;
 }
Example #4
0
 public override void Inject(PlayerUnitDI di)
 {
     action = di.abilities.action;
     action.OnIsGuardingChange += OnIsGuardingChange;
 }
Example #5
0
 public void Inject(PlayerUnitDI di)
 {
     action       = di.abilities.action;
     unitAnimator = di.animator;
     action.OnIsGuardingChange += OnIsGuardingChange;
 }
Example #6
0
 public void Inject(PlayerUnitDI di)
 {
     action   = di.abilities.action;
     flip     = di.flip;
     isShield = di.stats.SlimeType == SlimeType.Shield;
 }