예제 #1
0
    protected ac_FPParkourEventHandler m_Player = null;         // Need this to access the above and the player.

    // Use this for initialization
    protected override void  Awake()
    {
        base.Awake();

        //initial setup
        m_Audio  = audio;
        m_Player = (ac_FPParkourEventHandler)transform.root.GetComponentInChildren(typeof(ac_FPParkourEventHandler));
    }
    protected ac_FPParkourEventHandler m_Player = null; // Need this to access the above and the player.

    #endregion Fields

    #region Methods

    // Use this for initialization
    protected override void Awake()
    {
        base.Awake();

        //initial setup
        m_Audio = GetComponent<AudioSource>();
        m_Player  = (ac_FPParkourEventHandler)transform.root.GetComponentInChildren(typeof(ac_FPParkourEventHandler));
    }
예제 #3
0
    // Use this for initialization
    protected override void Awake()
    {
        base.Awake();

        // initial setup
        m_Audio = GetComponent<AudioSource>();
        m_CharacterController = gameObject.GetComponent<CharacterController>();
        m_Controller = (vp_FPController)transform.root.GetComponentInChildren(typeof(vp_FPController));
        m_Player  = (ac_FPParkourEventHandler)transform.root.GetComponentInChildren(typeof(ac_FPParkourEventHandler));
        m_Camera = GetComponentInChildren<vp_FPCamera>();
        m_Transform = transform;
        m_FootstepManager = (vp_FootstepManager)transform.root.GetComponentInChildren(typeof(vp_FootstepManager));

        m_currentDoubleJump = DoubleJumpCount ;
        m_CanWallRunAgain = Time.time;
        m_CanDashAgain = Time.time;
        m_CanGroundslideAgain = Time.time;

        // spawn the parkour arm at world origin and hide it
        if(ParkourArmPrefab != null)
        {
            ParkourArmPrefab = (GameObject)Object.Instantiate(ParkourArmPrefab,Vector3.zero,Quaternion.identity);
            ParkourArmPrefab.SetActive(false);
        }
    }