示例#1
0
    public void UpdateCameraButtons(ElasticCameraOperator.Mode mode)
    {
        SwitchButton button = buttons
            .Where (b => b.mode == mode).FirstOrDefault ();
        List<SwitchButton> others = buttons
            .Where (b => b.mode != mode)
            .Where (b => !b.isDummy).ToList ();

        // interactive
        if (!button.isDummy && button.isBaseButton) {
            button.button.interactable = false;
            others
                .Where (b => b.isBaseButton)
                .Select (b => b.button).ToList ()
                .ForEach (b => b.interactable = true);
        }

        // color
        if (!button.isDummy) {
            button.button.SetColor (playingColor);
        }
        others.ForEach (b => b.button.SetColor (inactiveColor));
    }
示例#2
0
 private void OnCameraChanged(ElasticCameraOperator.Mode mode, bool isBase)
 {
     cameraOperator.SetMode (mode, isBase);
 }