示例#1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     IKTargeting = new CharacterIK();
 }
 private void Start()
 {
     //Initialization.
     player  = PlayerManager.Instance;
     pause   = PauseManager.Instance;
     ability = AbilityManager.Instance;
     anim    = TP_Animations.Instance;
 }
    private void Start()
    {
        //Initialization.
        player       = PlayerManager.Instance;
        anim         = TP_Animations.Instance;
        pause        = PauseManager.Instance;
        levelManager = LevelManager.Instance;

        //Create a virtual plane for the rotation.
        rotationPlane = new Plane(Vector3.up, Vector3.up * (transform.position.y + 0.465f));

        //Call the body rotation once to try matching the mouse and the crosshair position.
        RotateBody();

        //Repeatedly invoke the footstep sound player method.
        InvokeRepeating("PlayFootstepSound", 0f, 0.275f);
    }