void OnCommandEvent()
 {
     var holder = new ConditionHolder();
     refConditionObject.SendMessage( ConditionHolder.ConditionMessage, holder );
     string label = holder.IsSuccess ? successLabel : failureLabel;
     SoundManager.Instance.Play( label );
 }
示例#2
0
 public ResultList()
 {
     Results    = new ObservableCollection <object>();
     MaxPerPage = 100;
     InitializeComponent();
     Question   = "Default view";
     Conditions = new ConditionHolder();
 }
    void OnCommandEvent()
    {
        var holder = new ConditionHolder();
        refConditionObject.SendMessage( ConditionHolder.ConditionMessage, holder );

        if( !holder.IsSuccess )
        {
            return;
        }

        refTarget.SetActive( isActive );
    }
    void OnCommandEvent( CommandManager.CommandEventData data )
    {
        var holder = new ConditionHolder();
        holder.IsSuccess = true;
        if( refConditionObject != null )
        {
            refConditionObject.SendMessage( ConditionHolder.ConditionMessage, holder );
        }

        if( holder.IsSuccess )
        {
            data.LockInput();
            Change();
        }
    }
示例#5
0
        public List <Record> Select(ConditionHolder conditions, int offset, int count)
        {
            List <Record> rec = new List <Record>();

            if (count < 0)
            {
                count = _records.Count;
            }

            foreach (Record record in _records)
            {
                if (conditions.Accept(record))
                {
                    rec.Add(record);
                }
                if (rec.Count == count)
                {
                    break;
                }
            }
            return(rec);
        }
 void CatchCondition( ConditionHolder holder )
 {
     holder.IsSuccess = CanPlay;
 }
 void CatchCondition( ConditionHolder holder )
 {
     holder.IsSuccess = SceneManager.Instance.CanChange;
 }
 void CatchCondition( ConditionHolder holder )
 {
     holder.IsSuccess = Flag;
 }
示例#9
0
 public ResultSelect()
 {
     InitializeComponent();
     Conditions = new ConditionHolder();
 }