Beispiel #1
0
 public StateFalling(Fsm fsm) : base(fsm)
 {
     _material   = Resources.Load <PhysicsMaterial2D>("NoFriction");
     _collider   = Fsm.gameObject.GetComponent <Collider2D>(); _collider.sharedMaterial = null;
     _locomotion = Fsm.gameObject.GetOrAdd <ManagerLocomotion>(); _locomotion.Rigidbody.gravityScale = 11f;
     _input      = Fsm.gameObject.GetComponent <IManagerInput>();
 }
 public StateMovingCurvedGround(Fsm fsm)
     : base(fsm)
 {
     _locomotion = Fsm.gameObject.GetOrAdd<ManagerLocomotion>();
     _ground = Fsm.gameObject.GetOrAdd<ManagerGroundProbe>();
     _input = Fsm.gameObject.GetComponent<IManagerInput>();
 }
 public StateFalling(Fsm fsm)
     : base(fsm)
 {
     _material = Resources.Load<PhysicsMaterial2D>("NoFriction");
     _collider = Fsm.gameObject.GetComponent<Collider2D>(); _collider.sharedMaterial = null;
     _locomotion = Fsm.gameObject.GetOrAdd<ManagerLocomotion>(); _locomotion.Rigidbody.gravityScale = 11f;
     _input = Fsm.gameObject.GetComponent<IManagerInput>();
 }
 public StateMovingCurvedGround(Fsm fsm) : base(fsm)
 {
     _locomotion = Fsm.gameObject.GetOrAdd <ManagerLocomotion>();
     _ground     = Fsm.gameObject.GetOrAdd <ManagerGroundProbe>();
     _input      = Fsm.gameObject.GetComponent <IManagerInput>();
 }