void Start ()
	{
		if (GameManager.componentActivatorOn) 
		{
			ComponentActivator.Instance.Register (this, new Dictionary<GameEvent, bool> { 

				//{ GameEvent.Land, true },
				{ GameEvent.ClimbOverEdge, true },
				{ GameEvent.StopClimbing, true },
				{ GameEvent.FinishClimbOver, true },
				//{ GameEvent.Land, true },

				//{ GameEvent.LandedFirstTime, false },
				{ GameEvent.StartVineClimbing, false }, 
				{ GameEvent.StartEdgeClimbing, false },
				{ GameEvent.StartWallClimbing, false }

			});
		}

		charState = GetComponent<RomanCharState>();
		animator = GetComponent<Animator>();
		rb = GetComponent<Rigidbody>();
		cam = Camera.main.transform;
		cController = GetComponent<CharacterController>();
		cCollider = GetComponent<CapsuleCollider>();
		vineClimbCollider = GetComponent<VineClimbController2>();
		tunnelObserver = GameManager.Instance.tunnelObserver;
		combatController = GetComponent<CombatController> ();
	}
	private void Start ()
	{
		
		if (Instance == null)
			Instance = this;
		else
			Destroy(this);

//		if (cam == null)
//			cam = Camera.main.GetComponent<TestCam>();
		simpleRpgCam = Camera.main.GetComponent<PhatRobit.SimpleRpgCamera>();

		charState = GameObject.FindObjectOfType<RomanCharState> ();
		//camScript = GameObject.FindObjectOfType<RomanCameraController> ();
		climbDetector = GameObject.FindObjectOfType<ClimbDetector> ();
		follow = GameObject.FindObjectOfType<FollowPlayer>();
		vineClimbCollider = GameObject.FindObjectOfType<VineClimbController2>();
		charController = GameObject.FindObjectOfType<RomanCharController>();
		tunnelObserver = GameObject.FindObjectOfType<TunnelObserver>();
		antiWallSlideController = GameObject.FindObjectOfType<SloapDetector>();

		//cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<TestCam>();

		// Get the character that is selected
		if (charController != null)
			currentChar = charController.transform;
	}
    private void Awake()
    {
        EventManager.onCharEvent = null;
        EventManager.onInputEvent = null;
        EventManager.onDetectEvent = null;

        if (Instance == null)
            Instance = this;
        else
            Destroy(this);

        charState = GameObject.FindObjectOfType<RomanCharState> ();
        //camScript = GameObject.FindObjectOfType<RomanCameraController> ();
        climbDetector = GameObject.FindObjectOfType<ClimbDetector> ();
        follow = GameObject.FindObjectOfType<FollowPlayer>();
        vineClimbCollider = GameObject.FindObjectOfType<VineClimbController2>();
        charController = GameObject.FindObjectOfType<RomanCharController>();
    }
    void Start()
    {
        ComponentActivator.Instance.Register(this, new Dictionary<GameEvent, bool> {

            { GameEvent.Land, true },
            { GameEvent.StopVineClimbing, true },
            { GameEvent.StopEdgeClimbing, true },
            { GameEvent.FinishClimbOver, true },

            { GameEvent.StartVineClimbing, false },
            { GameEvent.StartEdgeClimbing, false },

        });

        charState = GetComponent<RomanCharState>();
        animator = GetComponent<Animator>();
        rb = GetComponent<Rigidbody>();
        cam = Camera.main.transform;
        cController = GetComponent<CharacterController>();
        cCollider = GetComponent<CapsuleCollider>();
        vineClimbCollider = GetComponent<VineClimbController2>();
    }