コード例 #1
0
 protected override void HandleIsActiveChanged(bool newIsActive)
 {
     if (newIsActive)
     {
         FindSeatController findSeatController = GetComponent <FindSeatController>();
         findSeatController.setTbc(GameObject.Find("TableFiller").GetComponent <TableFillerController>());
         findSeatController.seat(findSeatController.getTbc().getTable());
     }
 }
コード例 #2
0
    private void createPlayer(GameObject prefab, Transform parent, string name, Vector3 position, int dialogPos)
    {
        GameObject player = Instantiate(prefab);

        player.transform.SetParent(parent);
        player.name = name;
        player.transform.position = position;
        FindSeatController findSeatController = player.GetComponent <FindSeatController>();

        findSeatController.setTbc(GameObject.Find("TableFiller").GetComponent <TableFillerController>());
        findSeatController.seat(findSeatController.getTbc().getTable());
    }