예제 #1
0
 private void Awake()
 {
     _input               = GetComponent <InputReader>();
     _mover               = new PlayerRBMover(this);
     _playerRotator       = new PlayerRotator(this);
     _animationController = new PlayerAnimationController(this);
     _startPos            = transform.position;
     _playerAgent         = GetComponent <NavMeshAgent>();
 }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        PlayerRBMover playa = Component.FindObjectOfType <PlayerRBMover>();

        thoughts = playa.transform.Find("Main Camera").Find("thoughts").GetComponent <AudioSource>();
        music    = playa.transform.Find("Main Camera").Find("music").GetComponent <AudioSource>();
        feet     = playa.transform.Find("Main Camera").Find("feet").GetComponent <AudioSource>();

        //keep me
        DontDestroyOnLoad(transform.gameObject);
    }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        Debug.Log("initializing");
        PlayerRBMover playa = Component.FindObjectOfType <PlayerRBMover>();

        playa.transform.position = GameObject.FindGameObjectWithTag("spawn").transform.position;
        playa.SetTerrain();
        GameObject[] cleanup = GameObject.FindGameObjectsWithTag("cleanMe");
        foreach (GameObject g in cleanup)
        {
            Destroy(g);
        }
        if (playMusic)
        {
            //GameObject.FindObjectOfType<AudioManager>().AdvanceTrack(false);
        }
    }
예제 #4
0
파일: physDoor.cs 프로젝트: Kramdar93/LD45
 void Start()
 {
     am     = GameObject.FindObjectOfType <AudioManager>();
     rb     = transform.parent.GetComponent <Rigidbody>();
     player = GameObject.FindObjectOfType <PlayerRBMover>();
 }
예제 #5
0
 void Start()
 {
     am     = GameObject.FindObjectOfType <AudioManager>();
     player = GameObject.FindObjectOfType <PlayerRBMover>();
 }