コード例 #1
0
ファイル: WorldState.cs プロジェクト: Nosrick/JoyUnity
        public override void Start()
        {
            base.Start();
            m_ActiveWorld.Player.UpdateMe();
            m_GameplayFlags = GameplayFlags.Moving;
            RumourMill.GenerateRumours(m_ActiveWorld);

            SetEntityWorld(overworld);

            if (s_GUIManager == null)
            {
                GameObject          obj     = GameObject.Find("GUIInventory");
                JoyInventoryManager manager = obj.GetComponent <JoyInventoryManager>();
                manager.SetPlayer(m_ActiveWorld.Player);
                //manager.DoAll();
            }

            SetUpUi();
        }
コード例 #2
0
ファイル: WorldState.cs プロジェクト: Nosrick/JoyUnity
        protected void ChangeWorld(WorldInstance newWorld, Vector2Int spawnPoint)
        {
            Done = true;

            WorldInstance oldWorld = m_ActiveWorld;
            Entity        player   = oldWorld.Player;

            m_ActiveWorld.RemoveEntity(player.WorldPosition);

            m_ActiveWorld = newWorld;
            m_ActiveWorld.AddEntity(player);
            player.MyWorld = m_ActiveWorld;

            player = m_ActiveWorld.Player;

            player.Move(spawnPoint);
            player.UpdateMe();

            m_GameplayFlags = GameplayFlags.Moving;
            RumourMill.GenerateRumours(m_ActiveWorld);

            QuestTracker.PerformExploration(player, newWorld);
            Tick();
        }