Esempio n. 1
0
 public IMoveStrategy(ref MovementProps props, ref MovementAttr attr, Player player)
 {
     this.props             = props;
     this.player            = player;
     this.rayCastController = player.RayCastController;
     this.attr = attr;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public SlideMoveStrategy(ref MovementProps props, ref MovementAttr attr, Player player) : base(ref props, ref attr, player)
 {
 }
Esempio n. 4
0
 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;
 }