Ejemplo n.º 1
0
 void Awake()
 {
     arcadeManager        = GameObject.FindObjectOfType <ArcadeManager>();
     myTransform          = transform.parent.transform;
     stateManager         = GetComponentInChildren <StateManager>();
     disappearer          = GetComponent <Disappearer>();
     animator             = GetComponentInParent <Animator>();
     locomotionController = GetComponent <CatchableLocomotionController>();
 }
Ejemplo n.º 2
0
    // Use this for initialization
    void Awake()
    {
        animator = GetComponentInParent <Animator>();

        animator.Play("run");

        catchableLocomotionController = GetComponent <CatchableLocomotionController>();
        parents = catchableLocomotionController.Paraents;

        if (gameObject.scene.name == "Room")
        {
            roomManager = GameObject.FindObjectOfType <RoomManager>();
            foreach (var item in roomManager.movePoint)
            {
                attractions.Add(item);
            }

            rnd = Random.Range(0, attractions.Count);

            catchableLocomotionController.Goto(attractions[rnd]);
        }
    }