Пример #1
0
 public CharacterState(Rigidbody rb, Animator anim, Transform transform, HumanoidController humanoidController)
 {
     this.rb                 = rb;
     this.animator           = anim;
     this.transform          = transform;
     this.humanoidController = humanoidController;
 }
Пример #2
0
 public SeatingState(Rigidbody rb, Animator anim, Transform transform, HumanoidController humanoidController, Vehicle vehicle) : base(rb, anim, transform, humanoidController)
 {
     this.vehicle = vehicle;
     animator.SetBool(sittingBool, true);
     animator.Update(0f);
     humanoidController.GetComponent <CapsuleCollider>().enabled = false;
 }
Пример #3
0
        public static void TestBridgeDesign()
        {
            HumanoidController humanoidController = new HumanoidController(new Humanoidchar());

            humanoidController.RunChar();

            SpiderController spiderController = new SpiderController(new SpiderChar());

            spiderController.RunChar();
        }
Пример #4
0
 public override void Start()
 {
     base.Start();
     CFG.ApplyFPSRate();
     _humanoidController = this.GetComponent<HumanoidController>();
     _playerController = this.GetComponent<PlayerController>();
     _questionController = this.GetComponent<QuestionController>();
     _humanoidController.enabled = false;
     _questionController.enabled = false;
     Setup();
 }
Пример #5
0
 public override void Start()
 {
     base.Start();
     CFG.ApplyFPSRate();
     _humanoidController         = this.GetComponent <HumanoidController>();
     _playerController           = this.GetComponent <PlayerController>();
     _questionController         = this.GetComponent <QuestionController>();
     _humanoidController.enabled = false;
     _questionController.enabled = false;
     Setup();
 }
Пример #6
0
    public OnFeetState(Rigidbody rb, Animator anim, Transform transform, HumanoidController humanoidController, float maxDistanceToVehicle, float minDistanceToVehicle, float torqueKoefficient, int vehiclesLayerMask, int groundMask) : base(rb, anim, transform, humanoidController)
    {
        this.maxDistanceToVehicle = maxDistanceToVehicle;
        this.minDistanceToVehicle = minDistanceToVehicle;
        this.torqueKoefficient    = torqueKoefficient;
        this.vehiclesLayerMask    = vehiclesLayerMask;
        this.groundMask           = groundMask;

        transform.rotation = Quaternion.LookRotation(Vector3.Cross(transform.right, Vector3.up), Vector3.up);
        animator.SetBool(sittingBool, false);
        humanoidController.GetComponent <Collider>().enabled = true;
    }