コード例 #1
0
        private GameConfig(Reader reader)
        {
            GameName   = reader.ReadRSDKString();
            DataString = reader.ReadRSDKString();
            Disclaimer = reader.ReadRSDKString();

            Console.WriteLine(GameName);
            Console.WriteLine(DataString);
            Console.WriteLine(Disclaimer);

            this.ReadObjectsNames(reader);

            byte Globals_Amount = reader.ReadByte();

            for (int i = 0; i < Globals_Amount; i++)
            {
                Globals.Add(new Global(reader));
            }

            this.ReadWAVConfiguration(reader);

            byte PLR_data_count = reader.ReadByte();

            for (int i = 0; i < PLR_data_count; ++i)
            {
                Players.Add(new PlayerData(reader));
            }

            Scenes = new StageList(reader);

            reader.Close();
        }
コード例 #2
0
        public void OnGet(string id)
        {
            // Fetch selected house
            var house = _houseRepository.Read(id);

            this.House         = new ViewModels.HouseViewModel(house);
            this.StageList     = _stageRepository.List(house);
            this.stageNameList = new List <string>();
            //stageNameList = this.StageList;

            for (int i = 0; i < this.StageList.Count; i++)
            {
                if (!this.stageNameList.Contains(this.StageList[i].StageName))
                {
                    this.stageNameList.Add(this.StageList[i].StageName);
                }
            }

            if (StageList.Any())
            {
                this.Stage     = StageList.First();
                this.ImageList = _imageRepository.List(this.House.Object, this.Stage.StageName);
            }
            else
            {
                this.ImageList = new List <Image>();
            }
        }
コード例 #3
0
        private GameConfig(Reader reader)
        {
            GameName    = reader.ReadRSDKString();
            DataString  = reader.ReadRSDKString();
            GameSubname = reader.ReadRSDKString();

            Console.WriteLine("Name = " + GameName);
            Console.WriteLine("Data = " + DataString);
            Console.WriteLine("SubName = " + GameSubname);

            this.ReadObjectsNames(reader);

            byte Globals_Amount = reader.ReadByte();

            for (int i = 0; i < Globals_Amount; i++)
            {
                Globals.Add(new Global(reader));
            }

            this.ReadWAVConfiguration(reader);

            Stages = new StageList(reader);

            reader.Close();
        }
コード例 #4
0
        ///--------------------------------------------------------------------------------
        /// <summary>This method disposes of resources in the model.</summary>
        ///--------------------------------------------------------------------------------
        protected override void OnDispose()
        {
            if (ReverseInstance != null)
            {
                ReverseInstance.Dispose();
                ReverseInstance = null;
            }
            if (ForwardInstance != null)
            {
                ForwardInstance.Dispose();
                ForwardInstance = null;
            }
            Solution = null;
            Solution = null;
            if (_stageList != null)
            {
                foreach (Stage item in StageList)
                {
                    item.Dispose();
                }
                StageList.Clear();
                StageList = null;
            }

            #region protected
            #endregion protected

            base.OnDispose();
        }
コード例 #5
0
        public void OnPostDelete(string id, string imageid)
        {
            this._imageRepository.Delete(new Image {
                Id = new Guid(imageid)
            });

            var house = _houseRepository.Read(id);

            this.House     = new ViewModels.HouseViewModel(house);
            this.StageList = _stageRepository.List(house);

            this.stageNameList = new List <string>();
            for (int i = 0; i < this.StageList.Count; i++)
            {
                if (!this.stageNameList.Contains(this.StageList[i].StageName))
                {
                    this.stageNameList.Add(this.StageList[i].StageName);
                }
            }

            if (StageList.Any())
            {
                this.Stage     = StageList.First();
                this.ImageList = _imageRepository.List(this.House.Object, this.Stage.StageName);
            }
            else
            {
                this.ImageList = new List <Image>();
            }
        }
コード例 #6
0
        //public static UserListResult GetUserList()
        //{
        //    UserListResult result = new UserListResult();
        //    result = DefaultListDSForPJ.GetUserList();

        //    return result;
        //}

        //public static string AddNewUser(string FirstName, string MiddleName, string LastName, string EmailId, string UPI,
        //    string ADLogon, string userTypeID, string RoleID, string countryID)
        //{
        //    List<String> lstCountryId = new List<String>();
        //    lstCountryId = countryID.Split(',').ToList();

        //    var listresponse = DefaultListDSForPJ.AddNewUser(FirstName, MiddleName, LastName, EmailId, UPI, ADLogon, userTypeID, RoleID, lstCountryId);

        //    return listresponse;
        //}

        public static List <StageList> GetStageData(string JourneyId, int StatusId)
        {
            List <StageList> listStage = new List <StageList>();
            var listresponse           = DefaultListDSForPJ.GetStageData(Convert.ToInt32(JourneyId), StatusId);

            for (int i = 0; i < listresponse.Count; i++)
            {
                if (!listresponse[i].Stage_Name.ToLower().Equals("other"))
                {
                    StageList stage = new StageList();
                    stage.StageMasterId = listresponse[i].Stage_Master_Id;
                    stage.StageName     = listresponse[i].Stage_Name;
                    listStage.Add(stage);
                }
            }

            var       last   = listresponse.Where(x => x.Stage_Name.ToLower().Equals("other")).FirstOrDefault();
            StageList stage1 = new StageList();

            stage1.StageMasterId = last.Stage_Master_Id;
            stage1.StageName     = last.Stage_Name;
            listStage.Add(stage1);

            return(listStage);
        }
コード例 #7
0
    /// <summary>
    /// 스테이지 클리어 했을때의 행동을 함
    /// </summary>
    public void StageClear()
    {
        int currentWorld = HandOverData.WorldIndex;

        BackGround.instance.LightOn();
        if (HandOverData.WorldIndex == -1)
        {
            //mapedit
            StartCoroutine(ChangeScene(SceneName.mapEdit, 0, exitWaitTime));
        }
        else if (HandOverData.StageIndex == StageList.GetWorldSize(HandOverData.WorldIndex) - 1)
        {
            StageList.UnLock(HandOverData.WorldIndex + 1, 0);
            HandOverData.WorldIndex++;
            Exit(MainManager.View.StageSelect);
        }
        else
        {
            HandOverData.StageIndex++;
            StageList.UnLock(HandOverData.WorldIndex, HandOverData.StageIndex);
            HandOverData.StageName = StageList.GetStageName(HandOverData.WorldIndex, HandOverData.StageIndex);
            Debug.Log("world" + HandOverData.WorldIndex + "stage" + HandOverData.StageIndex);
            StartCoroutine(ChangeScene(SceneName.inGameScene, 3.5f, exitWaitTime));
        }
    }
コード例 #8
0
    public void InitializeStageSlot(StageData stageData, StageList stageList)
    {
        m_stageData = stageData;
        m_stageList = stageList;

        SetNumberText(stageData.number);
        SetNameText(stageData.name);
        SetConsumptionText(stageData.consumption);
    }
コード例 #9
0
    void Awake()
    {
        Instance = this;
        m_list = new List<StageQuestion>();

        //m_db = GameObject.FindObjectOfType<DBManager>();
        //m_tableName = "StageS";
        //m_limitOffset = 0;
        //m_limitCount = 0;

    }
コード例 #10
0
        private void ParseList(string name)
        {
            StageList stageList = new StageList(name);

            this._curRoot.Add(stageList);
            this._curRoot = stageList;
            while (this._idx < this._length)
            {
                char chr = this._s[this._idx];
                if (chr > ' ')
                {
                    if (chr == ',')
                    {
                        goto Label0;
                    }
                    if (chr == ']')
                    {
                        this._curRoot = this._curRoot.parent ?? this._curRoot;
                        return;
                    }
                }
                else
                {
                    switch (chr)
                    {
                    case '\t':
                    case '\n':
                    case '\f':
                    case '\r':
                    {
                        goto Label0;
                    }

                    case '\v':
                    {
                        break;
                    }

                    default:
                    {
                        if (chr == ' ')
                        {
                            goto Label0;
                        }
                        break;
                    }
                    }
                }
                this.ParseItemType(null, false);
Label0:
                this._idx++;
            }
        }
コード例 #11
0
        public StageItem StageValue(string name, object value)
        {
            IDictionary dictionaries = value as IDictionary;
            int         count        = dictionaries.Count;
            StageList   stageList    = new StageList(name);

            foreach (object key in dictionaries.Keys)
            {
                stageList.Add(new StageElement(string.Empty, new StageItem[] { SerializationMaster.Stage("key", key), SerializationMaster.Stage("value", dictionaries[key]) }));
            }
            return(stageList);
        }
コード例 #12
0
        public StageItem StageValue(string name, object value)
        {
            IList     lists     = value as IList;
            int       count     = lists.Count;
            StageList stageList = new StageList(name);

            for (int i = 0; i < count; i++)
            {
                StageItem stageItem = SerializationMaster.Stage("Item", lists[i]);
                stageList.Add(stageItem);
            }
            return(stageList);
        }
コード例 #13
0
        /// <summary>
        /// Stages the value.
        /// </summary>
        /// <param name="name">The name to give the resulting <see cref="StageItem" />.</param>
        /// <param name="value">The value to stage</param>
        /// <returns>
        /// The element containing the staged value.
        /// </returns>
        public StageItem StageValue(string name, object value)
        {
            var list        = value as IList;
            var count       = list.Count;
            var listElement = new StageList(name);

            for (int i = 0; i < count; i++)
            {
                var item = SerializationMaster.Stage("Item", list[i]);
                listElement.Add(item);
            }

            return(listElement);
        }
コード例 #14
0
ファイル: StageServices.cs プロジェクト: nathfn/Streak.NET
        /// <summary>
        /// This call lists the stages defined in a pipeline. Remember, this is only the definition of the stages - to change what stage a box is in, simply update the box with a new stageKey.
        /// </summary>
        /// <returns></returns>
        public StageList ListStagesInPipeline(string pipelineKey)
        {
            if (string.IsNullOrEmpty(pipelineKey))
            {
                throw new ArgumentNullException(nameof(pipelineKey), "Please specify a pipeline key!");
            }
            var stageList = new StageList
            {
                RawApiResponse = _rawStageServices.ListStagesInPipeline(pipelineKey)
            };

            stageList.Stages         = JsonConvert.DeserializeObject <Dictionary <string, Stage> >(stageList.RawApiResponse.Json);
            stageList.RawApiResponse = GetRawApiResponseOrNull(stageList.RawApiResponse);
            return(stageList);
        }
コード例 #15
0
 /// <summary>
 /// 인게임 스테이지로 이동
 /// </summary>
 /// <param name="stageNum"></param>
 public void GoToStage(int worldIndex, int stageIndex)
 {
     if (isSceneChanging == false)
     {
         HandOverData.StageName     = StageList.GetStageName(worldIndex, stageIndex);
         HandOverData.StageIndex    = stageIndex;
         HandOverData.WorldIndex    = worldIndex;
         HandOverData.ShowStageInfo = true;
         if (worldIndex > PlayerPrefs.GetInt(PrefsKey.lastWorld))
         {
             PlayerPrefs.SetInt(PrefsKey.lastWorld, worldIndex);
         }
         UnityEngine.SceneManagement.SceneManager.LoadScene(SceneName.inGameScene);
     }
 }
コード例 #16
0
 public void SetInit(int worldIndex, int stageIndex)
 {
     this.worldIndex = worldIndex;
     this.stageIndex = stageIndex;
     isUnLocked      = StageList.IsUnLocked(worldIndex, stageIndex);
     onClick.AddListener(() => OnClick());
     transform.Find("Title").GetComponent <Text>().text = RomanNumber.Roman(stageIndex + 1);
     if (isUnLocked)
     {
         transform.Find("LockImage").gameObject.SetActive(false);
     }
     else
     {
         transform.Find("LockImage").gameObject.SetActive(true);
     }
 }
コード例 #17
0
 public void SaveStage()
 {
     try
     {
         string      sql = "INSERT INTO Stages(Name) VALUES (@Stage)";
         DbParameter par = Database.AddParameter("@Stage", NewStage.Name);
         Database.ModifyData(sql, par);
         StageList.Add(NewStage);
         StageList = Stage.GetStages();
         MessageBox.Show("Podium werd succesvol toegevoegd");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
コード例 #18
0
 private void UpdateExeStageInvoke(int StageConfigID)
 {
     try
     {
         var entity = StageList.Where(m => m.StageConfigID == StageConfigID).FirstOrDefault();
         if (entity != null)
         {
             string result = string.Format("更新等级{0}!",
                                           ProgramStageConfigServiceBLLService.Instance.UpdataData(entity) > 0 ? "成功" : "失败");
             MessageBox.Show(result + "重启程序后生效");
         }
     }
     catch (Exception ex)
     {
         LogHelper.WriteLog("更新监视程序异常:", ex);
     }
 }
コード例 #19
0
        /// <summary>
        /// Stages the value.
        /// </summary>
        /// <param name="name">The name to give the resulting <see cref="StageItem" />.</param>
        /// <param name="value">The value to stage</param>
        /// <returns>
        /// The element containing the staged value.
        /// </returns>
        public StageItem StageValue(string name, object value)
        {
            var dic         = value as IDictionary;
            var count       = dic.Count;
            var listElement = new StageList(name);

            foreach (var key in dic.Keys)
            {
                var item = new StageElement(
                    string.Empty,
                    SerializationMaster.Stage("key", key),
                    SerializationMaster.Stage("value", dic[key]));

                listElement.Add(item);
            }

            return(listElement);
        }
コード例 #20
0
    public void ListStages(int worldIndex)
    {
        for (int i = 0; i < stageSelectButtons.Length; i++)
        {
            stageSelectButtons[i].SetInit(0, i);
        }

        Vector2 buttonLocalPos = Vector2.zero;

        for (int i = 0; i < stageSelectButtons.Length; i++)
        {
            if (StageList.IsUnLocked(0, i))//잠겨있음
            {
                buttonLocalPos = stageSelectButtons[i].GetComponent <RectTransform>().anchoredPosition;
            }
        }
        this.GetComponent <RectTransform>().anchoredPosition = -buttonLocalPos;
    }
コード例 #21
0
        public void OnGet(string id)
        {
            // Fetch selected house
            var house = _houseRepository.Read(id);

            this.House     = new ViewModels.HouseViewModel(house);
            this.StageList = _stageRepository.List(house);

            if (StageList.Any())
            {
                this.Stage     = StageList.First();
                this.ImageList = _imageRepository.List(this.House.Object, this.Stage.StageName);
            }
            else
            {
                this.ImageList = new List <Image>();
            }
        }
コード例 #22
0
        private void button_StageAdd_Click(object sender, EventArgs e)
        {
            Stage  stage = new Stage();
            string msg   = SLDValidate(out stage);

            if (msg != "")
            {
                DevComponents.DotNetBar.MessageBoxEx.Show(msg, "[提示]", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                BindingList <Stage> StageList = null;
                StageList = dataGridView3.DataSource as BindingList <Stage>;

                if (StageList == null)
                {
                    StageList = new BindingList <Stage>();
                }

                //验证该水位是否存在
                var list = from d in StageList where stage.WaterLevel == d.WaterLevel select d;
                if (list.Count() > 0)
                {
                    DevComponents.DotNetBar.MessageBoxEx.Show("该水位数据已经存在,请核实!", "[提示]", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
                    StageList.Add(stage);
                    textBox_WaterLevel.Text = "";
                    textBox_kA.Text         = "";
                }
                //排序,重新绑定
                List <Stage> sl = StageList.OrderBy(i => i.WaterLevel).ToList();
                StageList = new BindingList <Stage>();
                foreach (var item in sl)
                {
                    Stage s = new Stage();
                    s.kA         = item.kA;
                    s.WaterLevel = item.WaterLevel;
                    StageList.Add(s);
                }
                dataGridView3.DataSource = StageList;
            }
        }
コード例 #23
0
    public static StageList GetCurrentStageList(WorldList worldList)
    {
        string path = SceneManager.GetActiveScene().path;

        foreach (StageList stageList in worldList.stageLists)
        {
            if (stageList.path == path)
            {
                return(stageList);
            }
        }

        Debug.Log("Current stage not found. Creating a new one.");
        StageList newList = new StageList(path);

        worldList.stageLists.Add(newList);

        return(newList);
    }
コード例 #24
0
        public void OnPostDelete(string id, string imageid)
        {
            this._imageRepository.Delete(new Image {
                Id = new Guid(imageid)
            });

            var house = _houseRepository.Read(id);

            this.House     = new ViewModels.HouseViewModel(house);
            this.StageList = _stageRepository.List(house);

            if (StageList.Any())
            {
                this.Stage     = StageList.First();
                this.ImageList = _imageRepository.List(this.House.Object, this.Stage.StageName);
            }
            else
            {
                this.ImageList = new List <Image>();
            }
        }
コード例 #25
0
        private void ParseList(string name)
        {
            var l = new StageList(name);

            _curRoot.Add(l);

            _curRoot = l;

            for (; _idx < _length; _idx++)
            {
                var c = _s[_idx];
                switch (c)
                {
                case ',':
                case ' ':
                case '\t':
                case '\n':
                case '\r':
                case '\f':
                {
                    /* Skip white space and item separator */
                    break;
                }

                case ']':
                {
                    _curRoot = _curRoot.parent ?? _curRoot;
                    return;
                }

                default:
                {
                    ParseItemType(null, false);
                    break;
                }
                }
            }
        }
コード例 #26
0
        private void WriteList(StageList list)
        {
            this._json.WriteListStart();
            bool flag = false;

            foreach (StageItem stageItem in list.Items())
            {
                if (!flag)
                {
                    flag = true;
                }
                else
                {
                    this._json.WriteSeparator();
                }
                if (stageItem is StageValue)
                {
                    this._json.WriteValue((StageValue)stageItem);
                }
                else if (stageItem is StageElement)
                {
                    this.WriteElement((StageElement)stageItem);
                }
                else if (!(stageItem is StageList))
                {
                    if (!(stageItem is StageNull))
                    {
                        continue;
                    }
                    this._json.WriteNull((StageNull)stageItem);
                }
                else
                {
                    this.WriteList((StageList)stageItem);
                }
            }
            this._json.WriteListEnd();
        }
コード例 #27
0
        private void WriteList(StageList list)
        {
            _json.WriteListStart();

            bool separate = false;

            foreach (var item in list.Items())
            {
                if (separate)
                {
                    _json.WriteSeparator();
                }
                else
                {
                    separate = true;
                }

                if (item is StageValue)
                {
                    _json.WriteValue((StageValue)item);
                }
                else if (item is StageElement)
                {
                    WriteElement((StageElement)item);
                }
                else if (item is StageList)
                {
                    WriteList((StageList)item);
                }
                else if (item is StageNull)
                {
                    _json.WriteNull((StageNull)item);
                }
            }

            _json.WriteListEnd();
        }
コード例 #28
0
 private void Start()
 {
     stageList = GetComponent <StageList>();
 }
コード例 #29
0
    // Update is called once per frame

    private void Start()
    {
        // GetComponent<BoxCollider2D>().enabled = true;
        player    = GameObject.FindGameObjectWithTag("Player").transform;
        stageList = GameObject.FindGameObjectWithTag("StageList").GetComponent <StageList>();
    }
コード例 #30
0
 public void OnSelect(Guid id)
 {
     this.Stage = StageList.Single(stage => stage.Id == id);
 }
コード例 #31
0
    void Start()
    {
        m_stageList = StageList.Instance;

        InitStageNumber();
    }