コード例 #1
0
    private void Start()
    {
        if (!PhotonNetwork.IsConnected)
        {
            this.enabled = false;
            Debug.LogWarning("not connected");
            return;
        }

        this.inputSnapshots = this.systemManager.InputSnapshots;
    }
コード例 #2
0
    private void SetInputBasedOnPlatform()
    {
        IGameInput gameInput;

#if UNITY_ANDROID
        gameInput = new AndroidInput(this.acceleratorPedal, this.leftButton, this.rightButton, this.brakeButton);
#endif

#if UNITY_STANDALONE
        gameInput = new PcInput();
#endif

#if UNITY_EDITOR
        gameInput = new PcInput();
#endif
        foreach (var system in this.entityManager.World.Systems)
        {
            if (system is InputSystem inputSystem)
            {
                inputSystem.GameInput      = gameInput;
                inputSystem.InputSnapshots = this.InputSnapshots = new InputSnapshots();
            }
        }
    }