コード例 #1
0
    public void DisplaySpaceStationUI(bool active)
    {
        spaceStationUI.SetActive(active);
        GameMaster.CurrentGameState = GameState.Station;

        if (active)
        {
            player.Dock();
            player.transform.position = spaceStationObject.transform.position;
            player.GetComponent <Rigidbody2D>().velocity = Vector3.zero;
        }
        else
        {
            GameMaster.CurrentGameState = GameState.Flying;
            player.Undock();
        }
    }
コード例 #2
0
ファイル: Customize.cs プロジェクト: Honeybunch/Space
    private void EndCustomization()
    {
        Camera cam = Camera.main;

        cam.orthographicSize = oldCameraSize;

        ClearAttachmentPoints();

        ship.Undock();

        WeaponToggles.gameObject.SetActive(false);

        customizing = false;
    }
コード例 #3
0
    public void DisplayBountyBoard(bool active)
    {
        BountyBoard.GetComponent <BountyBoard> ().DestroyButtons();
        BountyBoard.SetActive(active);

        if (active)
        {
            player.Dock();
            player.transform.position = spaceStation.transform.position;
            player.GetComponent <Rigidbody2D>().velocity = Vector3.zero;
        }
        else
        {
            player.Undock();
        }
    }