Ejemplo n.º 1
0
        void Awake()
        {
            eventPlayer = GetComponent <EventPlayer>();
            eventPlayer.AddParameters(new CustomParameter[] {
                new CustomParameter("Agitated", false),
            });

            ragdollController = GetComponent <RagdollController>();



            movement = GetComponent <MovementController>();
            turner   = GetComponent <Turner>();
            //jumper = GetComponent<Jumper>();
            platformer = GetComponent <Platformer>();
            combat     = GetComponent <CharacterCombat>();

            charAnimationMover = GetComponent <CharacterAnimatorMover>();
            characterMovement  = GetComponent <CharacterMovement>();

            turner.doAutoTurn = true;
            cam = Camera.main;

            combat.SetAimTargetCallback(() => cam.transform.position + cam.transform.forward * 500);

            turner.SetTurnTargetCallback(() => CalculateFaceDir());
        }
        void Awake()
        {
            movementController = GetComponent <MovementController>();

            eventPlayer = GetComponent <EventPlayer>();
            eventPlayer.AddParameters(
                new CustomParameter[] {
                // paremeters linked with script properties:
                new CustomParameter(speedName, () => movementController.speed),
                new CustomParameter(directionName, () => (int)movementController.direction),
                new CustomParameter(stanceName, () => movementController.stance),
            }
                );
        }