示例#1
0
 void Awake()
 {
     arcadeManager        = GameObject.FindObjectOfType <ArcadeManager>();
     myTransform          = transform.parent.transform;
     stateManager         = GetComponentInChildren <StateManager>();
     disappearer          = GetComponent <Disappearer>();
     animator             = GetComponentInParent <Animator>();
     locomotionController = GetComponent <CatchableLocomotionController>();
 }
示例#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]);
        }
    }