예제 #1
0
 void Awake()
 {
     _transform = GetComponent<Transform> ();
     _translation = new Vector3 (speed, 0, 0);
     _anim = GetComponentInChildren<Animator2D> ();
     _gameManager = GameObject.Find("GameManager").GetComponent<HorseGameManager>();
 }
    void Start()
    {
        _SetJumpSpeed();

        _controller = GetComponent<CharacterController> ();
        particle = transform.Find ("Particle");
        particle.gameObject.SetActive (false);

        _plane = transform.Find ("Plane");
        _currentSpeed = runningSpeed;
        _currentJumpSpeed = _jumpSpeed;
        _pondJumpSpeed = _jumpSpeed / 2f;
        _movement.x = _currentSpeed;
        _gameManager = GameObject.Find("GameManager").GetComponent<HorseGameManager>();

        anim.PlayAnimation (_idleAnim);
    }