public StateMovingCurvedGround(Fsm fsm)
     : base(fsm)
 {
     _locomotion = Fsm.gameObject.GetOrAdd<ManagerLocomotion>();
     _ground = Fsm.gameObject.GetOrAdd<ManagerGroundProbe>();
     _input = Fsm.gameObject.GetComponent<IManagerInput>();
 }
Пример #2
0
 public StateHit(Fsm fsm) : base(fsm)
 {
     StateDuration = 0.25f;
     _locomotion   = Fsm.gameObject.GetOrAdd <ManagerLocomotion>();
     _health       = Fsm.gameObject.GetOrAdd <ManagerHealth>();
     _collision    = Fsm.gameObject.GetOrAdd <ManagerCollision>();
 }
Пример #3
0
 private void GetManagers()
 {
     _ground     = gameObject.GetOrAdd <ManagerGroundProbe>();
     _health     = gameObject.GetOrAdd <ManagerHealth>();
     _collision  = gameObject.GetOrAdd <ManagerCollision>();
     _locomotion = gameObject.GetOrAdd <ManagerLocomotion>();
 }
Пример #4
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>();
 }
Пример #5
0
 private void GetManagers()
 {
     _ground = gameObject.GetOrAdd<ManagerGroundProbe>();
     _health = gameObject.GetOrAdd<ManagerHealth>();
     _collision = gameObject.GetOrAdd<ManagerCollision>();
     _locomotion = gameObject.GetOrAdd<ManagerLocomotion>();
 }
Пример #6
0
 public StateHit(Fsm fsm)
     : base(fsm)
 {
     StateDuration = 0.25f;
     _locomotion = Fsm.gameObject.GetOrAdd<ManagerLocomotion>();
     _health = Fsm.gameObject.GetOrAdd<ManagerHealth>();
     _collision = Fsm.gameObject.GetOrAdd<ManagerCollision>();
 }
Пример #7
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>();
 }
    void Awake()
    {
        _locomotion = gameObject.GetOrAdd<ManagerLocomotion>();
        _locomotion.DefaultSpeed = 300f;

        _collision = gameObject.GetOrAdd<ManagerCollision>();
        _collision.Damages = 1;

        Grid.particleSystem.Play("ball", transform, transform.right, true);
    }
Пример #9
0
    void Awake()
    {
        _locomotion = gameObject.GetOrAdd <ManagerLocomotion>();
        _locomotion.DefaultSpeed = 300f;

        _collision         = gameObject.GetOrAdd <ManagerCollision>();
        _collision.Damages = 1;

        Grid.particleSystem.Play("ball", transform, transform.right, true);
    }
Пример #10
0
 public StateJumping(Fsm fsm) : base(fsm)
 {
     _locomotion = Fsm.gameObject.GetOrAdd <ManagerLocomotion>();
 }
 public StateMovingCurvedGround(Fsm fsm) : base(fsm)
 {
     _locomotion = Fsm.gameObject.GetOrAdd <ManagerLocomotion>();
     _ground     = Fsm.gameObject.GetOrAdd <ManagerGroundProbe>();
     _input      = Fsm.gameObject.GetComponent <IManagerInput>();
 }
Пример #12
0
 public StateJumping(Fsm fsm)
     : base(fsm)
 {
     _locomotion = Fsm.gameObject.GetOrAdd<ManagerLocomotion>();
 }