示例#1
0
    public void ResetSimulation()
    {
        _isRunningSimulation = false;
        if (_tradingPost != null)
        {
            int x = _tradingPost.GetStartLocation().x;
            int z = _tradingPost.GetStartLocation().z;
            PlaceEntity <Script_TradingPost> (x, z);
        }

        if (_fallenStar != null)
        {
            int x = _fallenStar.GetStartLocation().x;
            int z = _fallenStar.GetStartLocation().z;
            PlaceEntity <Script_FallenStar> (x, z);
        }

        if (_spaceShip != null)
        {
            int x = _spaceShip.GetStartLocation().x;
            int z = _spaceShip.GetStartLocation().z;
            PlaceEntity <Script_SpaceShip> (x, z);
        }

        if (_chaser != null)
        {
            int x = _chaser.GetStartLocation().x;
            int z = _chaser.GetStartLocation().z;
            PlaceEntity <Script_StarChaser> (x, z);
        }
    }