Example #1
0
    /// <summary>
    /// 离开城镇
    /// </summary>
    public void IntentForLeaveTown()
    {
        SceneTownManager sceneTownManager = GameScenesHandler.Instance.manager.GetSceneManager <SceneTownManager>();

        //获取城镇出口位置
        movePosition = sceneTownManager.GetRandomTownDoorPosition();
        characterMoveCpt.SetDestination(movePosition);
    }
Example #2
0
    public IEnumerator StartBuild()
    {
        while (isBuildNpc)
        {
            yield return(new WaitForSeconds(buildInterval));

            SceneTownManager sceneTownManager = GameScenesHandler.Instance.manager.GetSceneManager <SceneTownManager>();
            Vector3          npcPosition      = sceneTownManager.GetRandomTownDoorPosition();
            BuilderPasser(npcPosition);
        }
    }