示例#1
0
        /// <inheritdoc />
        public Character()
        {
            _motionState = new CharacterMotionState(this);

            RunService.Service.Heartbeat.Connect(Update);
            InputService.Service.InputBegan.Connect(OnInputBegan);
            InputService.Service.InputEnded.Connect(OnInputEnded);

            _walkSpeed    = 16;
            CapsuleRadius = 2;
            CapsuleHeight = 5;

            RebuildRigidBody();
            Died = new Signal(this);
            Changed.Connect(OnChanged);
        }