public IMoveStrategy(ref MovementProps props, ref MovementAttr attr, Player player) { this.props = props; this.player = player; this.rayCastController = player.RayCastController; this.attr = attr; }
public Movement(Player player, MovementAttr stats) : base(player) { this.attr = stats; rayCastController = player.RayCastController; props = new MovementProps( ); basicMove = new BasicMoveStrategy(ref props, ref stats, player); spaceMove = new SpaceMoveStrategy(ref props, ref stats, player); slideMove = new SlideMoveStrategy(ref props, ref stats, player); strategy = basicMove; props.originGravity = player.Rb.gravityScale; }
public SlideMoveStrategy(ref MovementProps props, ref MovementAttr attr, Player player) : base(ref props, ref attr, player) { }
public SpaceMoveStrategy(ref MovementProps props, ref MovementAttr attr, Player player) : base(ref props, ref attr, player) { timer = new ScaledTimer(attr.SpaceJumpDuration); jumpFadeVel = attr.SpaceJumpVel / attr.SpaceJumpDuration; }