Exemplo n.º 1
0
 private void Update()
 {
     if(Input.GetKeyDown(KeyCode.F))
     {
         if(type == MODE_TYPE.NORMAL)
         {
            // objToActive.transform.position = gameObject.transform.position;
           //  objToActive.transform.localEulerAngles = gameObject.transform.localEulerAngles;
             objToActive.SetActive(false);
             type = MODE_TYPE.SURF;
             gameObject.GetComponent<CapsuleCollider>().enabled = true;
            // normalModeCamera.SetActive(false);
            // gameObject.SetActive(false);
         }
         else
         {
           //  objToActive.transform.position = gameObject.transform.position;
           //  objToActive.transform.localEulerAngles = gameObject.transform.localEulerAngles;
             objToActive.SetActive(true);
             type = MODE_TYPE.NORMAL;
           //  normalModeCamera.SetActive(true);
             gameObject.GetComponent<CapsuleCollider>().enabled = false;
         }
     }
 }
Exemplo n.º 2
0
    public void ButtonClick(int aaa)//建築ウィンドウの建物ボタンをクリック。その建物を建てるモードに切り替わる。
    {
        Debug.Log("aaa");
        switch (aaa)
        {
        case 0:
            type = MODE_TYPE.house;
            break;

        case 1:
            type = MODE_TYPE.INN;
            break;

        case 2:
            type = MODE_TYPE.church;
            break;

        case 3:
            type = MODE_TYPE.blacksmith;
            break;

        case 4:
            type = MODE_TYPE.architectureHouse;
            break;
        }
    }
Exemplo n.º 3
0
        public bool read()
        {
            Monitor.Enter(mLock);

            for (int i = 0; i < mControlDataList.Length; i++)
            {
                mControlDataList[i].Clear();
            }

            string jsonString;

            try
            {
                jsonString = File.ReadAllText(mControlFileName);
            }
            catch
            {
                mIsEnable = false;
                Monitor.Exit(mLock);
                this.write();
                return(true);
            }

            try
            {
                var rootObject = JObject.Parse(jsonString);

                mWidth      = (rootObject.ContainsKey("width") == true) ? rootObject.Value <int>("width") : mWidth;
                mHeight     = (rootObject.ContainsKey("height") == true) ? rootObject.Value <int>("height") : mHeight;
                mIsMaximize = (rootObject.ContainsKey("maximize") == true) ? rootObject.Value <bool>("maximize") : mIsMaximize;
                mIsEnable   = (rootObject.ContainsKey("enable") == true) ? rootObject.Value <bool>("enable") : mIsEnable;

                if (rootObject.ContainsKey("modeIndex") == false)
                {
                    mModeType = MODE_TYPE.NORMAL;
                }
                else
                {
                    int modeIndex = rootObject.Value <int>("modeIndex");
                    if (modeIndex < 0 || modeIndex > 3)
                    {
                        modeIndex = 0;
                    }
                    mModeType = (MODE_TYPE)modeIndex;
                }

                this.readData(rootObject, "control", mControlDataList[0]);
                this.readData(rootObject, "silence", mControlDataList[1]);
                this.readData(rootObject, "performance", mControlDataList[2]);
                this.readData(rootObject, "game", mControlDataList[3]);
            }
            catch
            {
                this.clear();
                Monitor.Exit(mLock);
                return(false);
            }
            Monitor.Exit(mLock);
            return(true);
        }
Exemplo n.º 4
0
        private void onRadioButtonClick(object sender, EventArgs e)
        {
            MODE_TYPE modeType = MODE_TYPE.NORMAL;

            if (sender == mNormalRadioButton)
            {
                modeType = MODE_TYPE.NORMAL;
            }
            else if (sender == mSilenceRadioButton)
            {
                modeType = MODE_TYPE.SILENCE;
            }
            else if (sender == mPerformanceRadioButton)
            {
                modeType = MODE_TYPE.PERFORMANCE;
            }
            else
            {
                modeType = MODE_TYPE.GAME;
            }
            if (modeType == mModeType)
            {
                return;
            }

            mModeType = modeType;

            mNormalRadioButton.Checked      = (mModeType == MODE_TYPE.NORMAL);
            mSilenceRadioButton.Checked     = (mModeType == MODE_TYPE.SILENCE);
            mPerformanceRadioButton.Checked = (mModeType == MODE_TYPE.PERFORMANCE);
            mGameRadioButton.Checked        = (mModeType == MODE_TYPE.GAME);

            this.onTempComboBoxIndexChanged(null, EventArgs.Empty);
        }
Exemplo n.º 5
0
 public void BattleStart()//バトル開始ボタンを押したとき。今のところ仮で入れてる。
 {
     SummonDemonParent.SetActive(false); ConstructionParent.SetActive(false);
     type = MODE_TYPE.Battle;
     worldController.heroPrefab.transform.position = worldController.battleStartPosition;
     worldController.heroPrefab.gameObject.GetComponent <HeroController>().target = worldController.heroPrefab.gameObject.GetComponent <HeroController>().serchTag(gameObject, "Enemy").transform;
 }
Exemplo n.º 6
0
    public void SimulateCircle(float fRadius, float fSpeed, bool bRotFront)
    {
        Vector3 pos = transform.position;

        m_fRadius = fRadius;
        m_Mode    = MODE_TYPE.ROTATE;
        m_fDist   = 1;
        SimulateStart(new Vector3(pos.x - fRadius, pos.y, pos.z), fSpeed, bRotFront);
    }
Exemplo n.º 7
0
 private void clear()
 {
     mIsEnable = false;
     for (int i = 0; i < mControlDataList.Length; i++)
     {
         mControlDataList[i].Clear();
     }
     mModeType = MODE_TYPE.NORMAL;
 }
Exemplo n.º 8
0
        public List <ControlData> getControlDataList(MODE_TYPE modeType)
        {
            Monitor.Enter(mLock);
            int modeIndex       = (int)modeType;
            var controlDataList = mControlDataList[modeIndex];

            Monitor.Exit(mLock);
            return(controlDataList);
        }
Exemplo n.º 9
0
    public void SimulateFall(float fHeight, float fSpeed, bool bRotFront)
    {
        Vector3 pos = transform.position;

        m_StartPos = new Vector3(pos.x, pos.y + fHeight, pos.z);
        m_EndPos   = new Vector3(pos.x, pos.y, pos.z);
        m_fDist    = Vector3.Distance(m_StartPos, m_EndPos);
        m_Mode     = MODE_TYPE.MOVE;
        SimulateStart(m_StartPos, fSpeed, bRotFront);
    }
Exemplo n.º 10
0
 //добавление строки
 private void AddData(Object o)
 {
     modeCK         = "Последовательный";
     newRow         = new MODE_TYPE();
     newRow.MT_NAME = "";
     data.Add(newRow);
     selectedRow = newRow;
     isEnabled   = true;
     focus();
 }
Exemplo n.º 11
0
    // Start is called before the first frame update
    void Start()
    {
        type        = MODE_TYPE.roam;
        agent.speed = heroPrefab.movementSpeed;
        StartCoroutine("FindPurpose");
        StartCoroutine("AttackAnimeStart");


        points = new Vector3[6];
        GotoNextPoint();
    }
Exemplo n.º 12
0
    public void SimulateTornado(float fRadius, float fHeight, float fSpeed, bool bRotFront)
    {
        Vector3 pos = transform.position;

        m_fRadius = fRadius;
        m_Mode    = MODE_TYPE.TORNADO;

        m_StartPos = new Vector3(pos.x - fRadius, pos.y, pos.z);
        m_EndPos   = new Vector3(pos.x - fRadius, pos.y + fHeight, pos.z);
        m_fDist    = Vector3.Distance(m_StartPos, m_EndPos);
        SimulateStart(m_StartPos, fSpeed, bRotFront);
    }
Exemplo n.º 13
0
	public void SimulateMove(NgEnum.AXIS nTransAxis, float fHalfDist, float fSpeed, bool bRotFront)
	{
		Vector3	pos	= transform.position;
		m_nAxis		= nTransAxis;
		m_StartPos	= pos;
		m_EndPos	= pos;
		m_StartPos[(int)m_nAxis]	-= fHalfDist;
		m_EndPos[(int)m_nAxis]		+= fHalfDist;
		m_fDist		= Vector3.Distance(m_StartPos, m_EndPos);
		m_Mode		= MODE_TYPE.MOVE;
		SimulateStart(m_StartPos, fSpeed, bRotFront);
	}
Exemplo n.º 14
0
    public void SimulateScale(FxmTestControls.AXIS nTransAxis, float fHalfDist, float fStartPosition, float fSpeed, bool bRotFront)
    {
        Vector3 pos = transform.position;

        m_nAxis    = nTransAxis;
        m_StartPos = pos;
        m_EndPos   = pos;
        m_StartPos[(int)m_nAxis] += fHalfDist * fStartPosition;
        m_EndPos[(int)m_nAxis]   += fHalfDist * 2 + fHalfDist * fStartPosition;
        m_fDist = Vector3.Distance(m_StartPos, m_EndPos);
        m_Mode  = MODE_TYPE.SCALE;
        SimulateStart(m_StartPos, fSpeed, bRotFront);
    }
Exemplo n.º 15
0
    public void SimulateMove(NgEnum.AXIS nTransAxis, float fHalfDist, float fSpeed, bool bRotFront)
    {
        Vector3 pos = transform.position;

        m_nAxis    = nTransAxis;
        m_StartPos = pos;
        m_EndPos   = pos;
        m_StartPos[(int)m_nAxis] -= fHalfDist;
        m_EndPos[(int)m_nAxis]   += fHalfDist;
        m_fDist = Vector3.Distance(m_StartPos, m_EndPos);
        m_Mode  = MODE_TYPE.MOVE;
        SimulateStart(m_StartPos, fSpeed, bRotFront);
    }
Exemplo n.º 16
0
        public void setControlDataList(MODE_TYPE modeType, List <ControlData> controlDataList)
        {
            Monitor.Enter(mLock);
            int modeIndex = (int)modeType;
            var selectedControlDataList = mControlDataList[modeIndex];

            selectedControlDataList.Clear();
            for (int i = 0; i < controlDataList.Count; i++)
            {
                selectedControlDataList.Add(controlDataList[i].clone());
            }
            Monitor.Exit(mLock);
        }
Exemplo n.º 17
0
        public List <ControlData> getCloneControlDataList(MODE_TYPE modeType)
        {
            Monitor.Enter(mLock);
            int modeIndex = (int)modeType;
            var selectedControlDataList = mControlDataList[modeIndex];
            var controlDataList         = new List <ControlData>();

            for (int i = 0; i < selectedControlDataList.Count; i++)
            {
                controlDataList.Add(selectedControlDataList[i].clone());
            }
            Monitor.Exit(mLock);
            return(controlDataList);
        }
Exemplo n.º 18
0
	public void SimulateArc(float fHalfDist, float fSpeed, bool bRotFront)
	{
		m_Curve = FXMakerOption.inst.m_SimulateArcCurve;

		if (m_Curve == null)
		{
			Debug.LogError("FXMakerOption.m_SimulateArcCurve is null !!!!");
			return;
		}

// 		float	fHeight = 0;
// 		for (int n = 0; n < m_Curve.length; n++)
// 			fHeight = Mathf.Max(m_Curve.keys[n].value);

		Vector3	pos	= transform.position;
		m_StartPos	= new Vector3(pos.x-fHalfDist, pos.y, pos.z);
		m_EndPos	= new Vector3(pos.x+fHalfDist, pos.y, pos.z);
		m_fDist		= Vector3.Distance(m_StartPos, m_EndPos);
		m_Mode		= MODE_TYPE.ARC;
		SimulateStart(m_StartPos, fSpeed, bRotFront);
	}
Exemplo n.º 19
0
    public void SimulateArc(float fHalfDist, float fSpeed, bool bRotFront)
    {
        m_Curve = FXMakerOption.inst.m_SimulateArcCurve;

        if (m_Curve == null)
        {
            Debug.LogError("FXMakerOption.m_SimulateArcCurve is null !!!!");
            return;
        }

//      float	fHeight = 0;
//      for (int n = 0; n < m_Curve.length; n++)
//          fHeight = Mathf.Max(m_Curve.keys[n].value);

        Vector3 pos = transform.position;

        m_StartPos = new Vector3(pos.x - fHalfDist, pos.y, pos.z);
        m_EndPos   = new Vector3(pos.x + fHalfDist, pos.y, pos.z);
        m_fDist    = Vector3.Distance(m_StartPos, m_EndPos);
        m_Mode     = MODE_TYPE.ARC;
        SimulateStart(m_StartPos, fSpeed, bRotFront);
    }
Exemplo n.º 20
0
 //Удаление режима и всех его исследований
 private void DeleteData(MODE_TYPE focusedRow)
 {
     if (focusedRow == null || focusedRow.MT_ID == 0)
     {
         return;
     }
     if (methodsEntities.MODE.Where(p => p.MODE_MT_ID == focusedRow.MT_ID).Count() != 0) //есть ссылка на выбранную строку
     {
         MessageBox.Show("Строка не может быть удалена, т.к. ссылка на неё используется в других таблицах");
         return;
     }
     try
     {
         methodsEntities.MODE_TYPE.Remove(methodsEntities.MODE_TYPE.Where(p => p.MT_ID == focusedRow.MT_ID).FirstOrDefault());
         methodsEntities.SaveChanges();
     }
     catch (Exception)
     {
         MessageBox.Show("Строка не может быть удалена, т.к. ссылка на неё используется в других таблицах");
         return;
     }
     RaisePropertyChanged(() => data);
 }
Exemplo n.º 21
0
	public void SimulateTornado(float fRadius, float fHeight, float fSpeed, bool bRotFront)
	{
		Vector3	pos	= transform.position;
		m_fRadius	= fRadius;
		m_Mode		= MODE_TYPE.TORNADO;

		m_StartPos	= new Vector3(pos.x-fRadius, pos.y, pos.z);
		m_EndPos	= new Vector3(pos.x-fRadius, pos.y+fHeight, pos.z);
		m_fDist		= Vector3.Distance(m_StartPos, m_EndPos);
		SimulateStart(m_StartPos, fSpeed, bRotFront);

	}
Exemplo n.º 22
0
 public void ChangeMode(MODE_TYPE mODE_TYPE)
 {
     type = mODE_TYPE;
 }
Exemplo n.º 23
0
 public void DownToVillageButton()
 {
     type = MODE_TYPE.GoToINN; target = serchTag(gameObject, "Village").transform; Debug.Log("よばれた");
 }
Exemplo n.º 24
0
	public void SimulateCircle(float fRadius, float fSpeed, bool bRotFront)
	{
		Vector3	pos	= transform.position;
		m_fRadius	= fRadius;
		m_Mode		= MODE_TYPE.ROTATE;
		m_fDist		= 1;
		SimulateStart(new Vector3(pos.x-fRadius, pos.y, pos.z), fSpeed, bRotFront);
	}
Exemplo n.º 25
0
 public void OnClickSummonDemonButton()
 {
     type = MODE_TYPE.SummonDemon;
 }
Exemplo n.º 26
0
 public void OnClickConstructionButton()//建設モード
 {
     type = MODE_TYPE.Construction;
 }
Exemplo n.º 27
0
 public void OnClickNeutralButton()//破壊モードや生成モードを普通モードにするボタン。見た目は×ボタン。
 {
     type = MODE_TYPE.Neutral;
 }
Exemplo n.º 28
0
 public void OnClickDestructionButoon()//破壊。施設などを破壊するボタン。
 {
     type = MODE_TYPE.Destruction;
 }
Exemplo n.º 29
0
        public ControlForm()
        {
            InitializeComponent();
            this.localizeComponent();

            mControlDataList[0] = ControlManager.getInstance().getCloneControlDataList(MODE_TYPE.NORMAL);
            mControlDataList[1] = ControlManager.getInstance().getCloneControlDataList(MODE_TYPE.SILENCE);
            mControlDataList[2] = ControlManager.getInstance().getCloneControlDataList(MODE_TYPE.PERFORMANCE);
            mControlDataList[3] = ControlManager.getInstance().getCloneControlDataList(MODE_TYPE.GAME);

            mModeType = ControlManager.getInstance().ModeType;

            this.initControl();
            this.initGraph();

            this.SetStyle(ControlStyles.UserPaint |
                          ControlStyles.OptimizedDoubleBuffer |
                          ControlStyles.AllPaintingInWmPaint |
                          ControlStyles.SupportsTransparentBackColor, true);
            this.Resize += (sender, e) =>
            {
                if (mIsResize == true)
                {
                    return;
                }
                mIsResize = true;

                //Console.WriteLine("Size : {0}, {1}", this.Width, this.Height);

                int widthGap  = this.Width - mLastSize.Width;
                int heightGap = this.Height - mLastSize.Height;

                //Console.WriteLine("Gap : {0}, {1}", widthGap, heightGap);

                mFanGroupBox.Height = mFanGroupBox.Height + heightGap;
                mFanListView.Height = mFanListView.Height + heightGap;
                mRemoveButton.Top   = mRemoveButton.Top + heightGap;

                mModeGroupBox.Width = mModeGroupBox.Width + widthGap;

                mGraphGroupBox.Width  = mGraphGroupBox.Width + widthGap;
                mGraphGroupBox.Height = mGraphGroupBox.Height + heightGap;

                mGraph.Width  = mGraph.Width + widthGap;
                mGraph.Height = mGraph.Height + heightGap;

                mPresetLabel.Left      = mPresetLabel.Left + widthGap;
                mPresetLoadButton.Left = mPresetLoadButton.Left + widthGap;
                mPresetSaveButton.Left = mPresetSaveButton.Left + widthGap;
                mUnitLabel.Left        = mUnitLabel.Left + widthGap;
                mUnitComboBox.Left     = mUnitComboBox.Left + widthGap;
                mHysLabel.Left         = mHysLabel.Left + widthGap;
                mHysNumericUpDown.Left = mHysNumericUpDown.Left + widthGap;
                mStepCheckBox.Left     = mStepCheckBox.Left + widthGap;

                mApplyButton.Left = mApplyButton.Left + widthGap;
                mApplyButton.Top  = mApplyButton.Top + heightGap;

                mOKButton.Left = mOKButton.Left + widthGap;
                mOKButton.Top  = mOKButton.Top + heightGap;

                mLastSize.Width  = this.Width;
                mLastSize.Height = this.Height;

                if (this.WindowState != FormWindowState.Maximized)
                {
                    mNormalLastSize.Width  = this.Width;
                    mNormalLastSize.Height = this.Height;
                }

                mIsResize = false;
            };

            this.ResizeBegin += (s, e) =>
            {
                mIsUpdateGraph = false;
                this.SuspendLayout();
            };
            this.ResizeEnd += (s, e) =>
            {
                this.ResumeLayout();
                mIsUpdateGraph = true;
            };

            if (ControlManager.getInstance().IsMaximize == true)
            {
                this.WindowState = FormWindowState.Maximized;
            }

            this.Width             = ControlManager.getInstance().Width;
            this.Height            = ControlManager.getInstance().Height;
            mLastSize.Width        = this.Width;
            mLastSize.Height       = this.Height;
            mNormalLastSize.Width  = this.Width;
            mNormalLastSize.Height = this.Height;
        }
Exemplo n.º 30
0
	public void SimulateScale(FxmTestControls.AXIS nTransAxis, float fHalfDist, float fStartPosition, float fSpeed, bool bRotFront)
	{
		Vector3	pos	= transform.position;
		m_nAxis		= nTransAxis;
		m_StartPos	= pos;
		m_EndPos	= pos;
		m_StartPos[(int)m_nAxis]	+= fHalfDist * fStartPosition;
		m_EndPos[(int)m_nAxis]		+= fHalfDist*2 + fHalfDist * fStartPosition;
		m_fDist		= Vector3.Distance(m_StartPos, m_EndPos);
		m_Mode		= MODE_TYPE.SCALE;
		SimulateStart(m_StartPos, fSpeed, bRotFront);
	}
Exemplo n.º 31
0
 // Start is called before the first frame update
 void Start()
 {
     type = MODE_TYPE.Neutral;
 }
Exemplo n.º 32
0
    private void Breathing()//呼吸という意味。普段からやってる行いのこと。
    {
        if (target == null)
        {
            target = null;
        }                                     //ターゲットが消えたらちゃんとヒーローのターゲットも無くす。
                                              // if (toVillage != true) {

        // if (battleflag == true) { moveflag = false; roamflag = false; }
        if (type == MODE_TYPE.move || type == MODE_TYPE.roam || type == MODE_TYPE.GoToINN)
        {
            animator.SetBool("Run", true); agent.isStopped = false;
        }
        else
        {
            animator.SetBool("Run", false); agent.isStopped = true;
        }

        if (target != null)
        {
            float distance = Vector3.Distance(target.position, transform.position);
            if (distance <= 7)
            {
                if (target.tag == "Enemy")
                {
                    type = MODE_TYPE.battle;
                }
                if (target.tag == "Boss")
                {
                    type = MODE_TYPE.battle;
                }
            }
            else if (distance <= 50)
            {
                type = MODE_TYPE.move;
                agent.destination = target.position;
            }
            else
            {
                if (target.tag == "Village")
                {
                    agent.destination = target.position;
                }
                else
                {
                    type   = MODE_TYPE.move;
                    target = null;
                }
            }

            if (type == MODE_TYPE.move)
            {
            }
            else
            {
                if (!(type == MODE_TYPE.GoToINN))
                {
                    // agent.speed = 0;  /*transform.LookAt(target);*/
                    if (type == MODE_TYPE.battle)
                    {
                        //バトル中に、移動を辞めているので敵の方向を向かない。ので向きを無理やり回転させる。
                        // 補完スピードを決める
                        float speed = 0.1f;
                        // ターゲット方向のベクトルを取得
                        Vector3 relativePos = target.position - transform.position;
                        // 方向を、回転情報に変換
                        Quaternion rotation = Quaternion.LookRotation(relativePos);
                        // 現在の回転情報と、ターゲット方向の回転情報を補完する
                        transform.rotation = Quaternion.Slerp(transform.rotation, rotation, speed);
                    }
                }
            }
        }
        else
        {
            type = MODE_TYPE.roam;
        }
        /* 目的地付近についたら次のポイントを目指す */
        if (type == MODE_TYPE.roam)
        {
            if (agent.remainingDistance < 0.5f)
            {
                GotoNextPoint();
            }
        }
        // }
        // else { Debug.Log("matiniikitai"); agent.speed = 2;
        //       agent.destination = target.position;
        //  }
    }
Exemplo n.º 33
0
    void Update()
    {
        CheckPossible();

        if (type == MODE_TYPE.Neutral)
        {
            generateStart = false;
        }
        else
        {
            generateStart = true;
        }
        if (generateStart == true)
        {
            var ray            = mainCamera.ScreenPointToRay(Input.mousePosition);
            var raycastHitList = Physics.RaycastAll(ray).ToList();


            if (raycastHitList.Any())//虚空をクリックしていない時のみ。
            {
                var distance      = Vector3.Distance(mainCamera.transform.position, raycastHitList.First().point);
                var mousePosition = new Vector3(Input.mousePosition.x, Input.mousePosition.y, distance);

                float duration = 3; // 光線の出ている時間
                receiveEvent.dammy.transform.position = raycastHitList.First().point;

                Debug.DrawRay(ray.origin, ray.direction * distance, Color.red, duration, false);
            }


            delayTime++;//一回目のクリックで生成されてしまわないように。
            if (Input.GetMouseButtonDown(0) && delayTime > 1)
            {
                GameObject obj;
                if (!EventSystem.current.IsPointerOverGameObject())
                {
                    switch (type)
                    {
                    case MODE_TYPE.Neutral:

                        break;

                    case MODE_TYPE.house:
                        obj = Instantiate(house, receiveEvent.dammy.transform.position, Quaternion.identity);

                        obj.GetComponent <MeshRenderer>().material = makkuro;
                        oracle.DecreaseFaith(houseGeneratePoint);
                        worldController.architectsNumber--;
                        break;

                    case MODE_TYPE.INN:
                        obj = Instantiate(INN, receiveEvent.dammy.transform.position, Quaternion.identity);
                        obj.GetComponent <MeshRenderer>().material = makkuro;

                        oracle.DecreaseFaith(INNGeneratePoint);
                        worldController.architectsNumber--;
                        break;

                    case MODE_TYPE.church:
                        obj = Instantiate(church, receiveEvent.dammy.transform.position, Quaternion.identity);
                        obj.GetComponent <MeshRenderer>().material = makkuro;

                        oracle.DecreaseFaith(churchGeneratePoint);
                        worldController.architectsNumber--;
                        break;

                    case MODE_TYPE.blacksmith:
                        obj = Instantiate(blacksmith, receiveEvent.dammy.transform.position, Quaternion.identity);
                        obj.GetComponent <MeshRenderer>().material = makkuro;
                        oracle.DecreaseFaith(blacksmithGeneratePoint);
                        worldController.architectsNumber--;
                        break;

                    case MODE_TYPE.architectureHouse:
                        obj = Instantiate(architectureHouse, receiveEvent.dammy.transform.position, Quaternion.identity);
                        obj.GetComponent <MeshRenderer>().material = makkuro;
                        oracle.DecreaseFaith(architectureHouseGeneratePoint);
                        worldController.architectsNumber--;
                        break;
                    }
                }


                delayTime     = 0;
                generateStart = false;
                type          = MODE_TYPE.Neutral;
                // Debug.Log("ダミーの座標" + receiveEvent.dammy.transform.position);
                // Debug.Log("本当の座標" + raycastHitList.First().point);

                raycastHitList.Clear();
                receiveEvent.dammy.SetActive(false);
            }
            else
            { //type = MODE_TYPE.Neutral;
            }
        }
    }
Exemplo n.º 34
0
	public void SimulateRaise(float fHeight, float fSpeed, bool bRotFront)
	{
		Vector3	pos	= transform.position;
		m_StartPos	= new Vector3(pos.x, pos.y, pos.z);
		m_EndPos	= new Vector3(pos.x, pos.y+fHeight, pos.z);
		m_fDist		= Vector3.Distance(m_StartPos, m_EndPos);
		m_Mode		= MODE_TYPE.MOVE;
		SimulateStart(m_StartPos, fSpeed, bRotFront);
	}
Exemplo n.º 35
0
        /// <summary>
        /// Prepare detail data for mapping to screen
        /// </summary>
        /// <param name="mode"></param>
        /// <returns></returns>
        private bool PrepareDetailData(MODE_TYPE mode)
        {
            try
            {
                doRentalQuotationData rqData = QUS012_RentalQuotationDataSession;
                if (rqData == null)
                {
                    return(false);
                }

                ViewBag.ProductCode = CommonUtil.TextCodeName(rqData.dtTbt_QuotationBasic.ProductCode,
                                                              rqData.dtTbt_QuotationBasic.ProductName);
                ViewBag.ContractTransferStatus = CommonUtil.TextCodeName(
                    rqData.dtTbt_QuotationBasic.ContractTransferStatus,
                    rqData.dtTbt_QuotationBasic.ContractTransferStatusName);
                ViewBag.ContractFeeCurrencyType = rqData.dtTbt_QuotationBasic.ContractFeeCurrencyType;
                if (rqData.dtTbt_QuotationBasic.ContractFeeCurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                {
                    ViewBag.ContractFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.ContractFeeUsd);
                }
                else
                {
                    ViewBag.ContractFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.ContractFee);
                }

                ViewBag.DepositFeeCurrencyType = rqData.dtTbt_QuotationBasic.DepositFeeCurrencyType;
                if (rqData.dtTbt_QuotationBasic.DepositFeeCurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                {
                    ViewBag.DepositFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.DepositFeeUsd);
                }
                else
                {
                    ViewBag.DepositFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.DepositFee);
                }
                ViewBag.Saleman1 = CommonUtil.TextCodeName(rqData.dtTbt_QuotationBasic.SalesmanEmpNo1,
                                                           rqData.dtTbt_QuotationBasic.SalesmanEmpNameNo1);
                ViewBag.Saleman2 = CommonUtil.TextCodeName(rqData.dtTbt_QuotationBasic.SalesmanEmpNo2,
                                                           rqData.dtTbt_QuotationBasic.SalesmanEmpNameNo2);
                ViewBag.SalesSupporter = CommonUtil.TextCodeName(rqData.dtTbt_QuotationBasic.SalesSupporterEmpNo,
                                                                 rqData.dtTbt_QuotationBasic.SalesSupporterEmpName);

                ViewBag.OutsourcingFeeCurrencyType = rqData.dtTbt_QuotationBasic.MaintenanceFee1CurrencyType;
                if (rqData.dtTbt_QuotationBasic.MaintenanceFee1CurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                {
                    ViewBag.OutsourcingFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.MaintenanceFee1Usd);
                }
                else
                {
                    ViewBag.OutsourcingFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.MaintenanceFee1);
                }

                ViewBag.AdditionalContractFee1CurrencyType = rqData.dtTbt_QuotationBasic.AdditionalFee1CurrencyType;
                if (rqData.dtTbt_QuotationBasic.AdditionalFee1CurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                {
                    ViewBag.AdditionalContractFee1 = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.AdditionalFee1Usd);
                }
                else
                {
                    ViewBag.AdditionalContractFee1 = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.AdditionalFee1);
                }
                ViewBag.AdditionalApproveNo1 = rqData.dtTbt_QuotationBasic.AdditionalApproveNo1;
                ViewBag.AdditionalContractFee2CurrencyType = rqData.dtTbt_QuotationBasic.AdditionalFee2CurrencyType;
                if (rqData.dtTbt_QuotationBasic.AdditionalFee2CurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                {
                    ViewBag.AdditionalContractFee2 = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.AdditionalFee2Usd);
                }
                else
                {
                    ViewBag.AdditionalContractFee2 = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.AdditionalFee2);
                }
                ViewBag.AdditionalApproveNo2 = rqData.dtTbt_QuotationBasic.AdditionalApproveNo2;
                ViewBag.AdditionalContractFee3CurrencyType = rqData.dtTbt_QuotationBasic.AdditionalFee3CurrencyType;
                if (rqData.dtTbt_QuotationBasic.AdditionalFee3CurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                {
                    ViewBag.AdditionalContractFee3 = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.AdditionalFee3Usd);
                }
                else
                {
                    ViewBag.AdditionalContractFee3 = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.AdditionalFee3);
                }
                ViewBag.AdditionalApproveNo3 = rqData.dtTbt_QuotationBasic.AdditionalApproveNo3;
                ViewBag.ApproveNo1           = rqData.dtTbt_QuotationBasic.ApproveNo1;
                ViewBag.ApproveNo2           = rqData.dtTbt_QuotationBasic.ApproveNo2;
                ViewBag.ApproveNo3           = rqData.dtTbt_QuotationBasic.ApproveNo3;
                ViewBag.ApproveNo4           = rqData.dtTbt_QuotationBasic.ApproveNo4;
                ViewBag.ApproveNo5           = rqData.dtTbt_QuotationBasic.ApproveNo5;

                if (mode == MODE_TYPE.AL || mode == MODE_TYPE.ONLINE)
                {
                    ViewBag.SecurityTypeCode = rqData.dtTbt_QuotationBasic.SecurityTypeCode;
                    ViewBag.DispatchType     = rqData.dtTbt_QuotationBasic.DispatchTypeCodeName;

                    if (rqData.OperationTypeList != null)
                    {
                        List <string> lstOpt = new List <string>();
                        foreach (doQuotationOperationType opt in rqData.OperationTypeList)
                        {
                            lstOpt.Add(opt.OperationTypeCode);
                        }
                        ViewBag.OperationTypeList = lstOpt.ToArray();
                    }

                    ViewBag.PhoneLineType               = rqData.dtTbt_QuotationBasic.PhoneLineTypeCodeName1;
                    ViewBag.ImageMonitoringType         = rqData.dtTbt_QuotationBasic.PhoneLineTypeCodeName2;
                    ViewBag.DisconnectionMonitoringType = rqData.dtTbt_QuotationBasic.PhoneLineTypeCodeName3;

                    ViewBag.PhoneLineOwner               = rqData.dtTbt_QuotationBasic.PhoneLineOwnerTypeCodeName1;
                    ViewBag.ImageMonitoringOwner         = rqData.dtTbt_QuotationBasic.PhoneLineOwnerTypeCodeName2;
                    ViewBag.DisconnectionMonitoringOwner = rqData.dtTbt_QuotationBasic.PhoneLineOwnerTypeCodeName3;

                    ViewBag.ProvideServiceType = SetProvideServiceType(rqData.dtTbt_QuotationBasic);
                    ViewBag.PlanCode           = rqData.dtTbt_QuotationBasic.PlanCode;
                    ViewBag.QuotationNo        = rqData.dtTbt_QuotationBasic.QuotationNo;

                    if (rqData.dtTbt_QuotationBasic.SpecialInstallationFlag == true)
                    {
                        ViewBag.SpecialInstallationFlag = CommonUtil.GetLabelFromResource(MessageUtil.MODULE_QUOTATION, "QUS012", "rdoSpecialInstall_Yes");
                    }
                    else
                    {
                        ViewBag.SpecialInstallationFlag = CommonUtil.GetLabelFromResource(MessageUtil.MODULE_QUOTATION, "QUS012", "rdoSpecialInstall_No");
                    }

                    ViewBag.Planner              = rqData.dtTbt_QuotationBasic.PlannerCodeName;
                    ViewBag.PlanChecker          = rqData.dtTbt_QuotationBasic.PlanCheckerCodeName;
                    ViewBag.PlanCheckingDate     = CommonUtil.TextDate(rqData.dtTbt_QuotationBasic.PlanCheckDate);
                    ViewBag.PlanApprover         = rqData.dtTbt_QuotationBasic.PlanApproverCodeName;
                    ViewBag.PlanApprovingDate    = CommonUtil.TextDate(rqData.dtTbt_QuotationBasic.PlanApproveDate);
                    ViewBag.SiteBuildingArea     = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.SiteBuildingArea);
                    ViewBag.SecurityAreaSizeFrom = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.SecurityAreaFrom);
                    ViewBag.SecurityAreaSizeTo   = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.SecurityAreaTo);
                    ViewBag.MainStructureType    = rqData.dtTbt_QuotationBasic.MainStructureTypeCodeName;
                    ViewBag.NewOldBuilding       = rqData.dtTbt_QuotationBasic.BuildingTypeCodeName;

                    if (rqData.dtTbt_QuotationBasic.NewBldMgmtFlag == true)
                    {
                        ViewBag.NewBldMgmtFlag = CommonUtil.GetLabelFromResource(MessageUtil.MODULE_QUOTATION, "QUS012", "rdoNewBuildingMgmtTypeFlagNeed");
                    }
                    else
                    {
                        ViewBag.NewBldMgmtFlag = CommonUtil.GetLabelFromResource(MessageUtil.MODULE_QUOTATION, "QUS012", "rdoNewBuildingMgmtTypeFlagNoNeed");
                    }


                    ViewBag.NewBldMgmtCostCurrencyType = rqData.dtTbt_QuotationBasic.NewBldMgmtCostCurrencyType;
                    if (rqData.dtTbt_QuotationBasic.NewBldMgmtCostCurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                    {
                        ViewBag.NewBldMgmtCost = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.NewBldMgmtCostUsd);
                    }
                    else
                    {
                        ViewBag.NewBldMgmtCost = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.NewBldMgmtCost);
                    }
                    ViewBag.NoBuilding       = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.NumOfBuilding, 0);
                    ViewBag.NoFloor          = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.NumOfFloor, 0);
                    ViewBag.MaintenanceCycle = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.MaintenanceCycle, 0);
                    ViewBag.InsuranceType    = rqData.dtTbt_QuotationBasic.InsuranceTypeCodeName;

                    ViewBag.InsuranceCoverageAmountCurrencyType = rqData.dtTbt_QuotationBasic.InsuranceCoverageAmountCurrencyType;
                    if (rqData.dtTbt_QuotationBasic.InsuranceCoverageAmountCurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                    {
                        ViewBag.InsuranceCoverageAmount = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.InsuranceCoverageAmountUsd);
                    }
                    else
                    {
                        ViewBag.InsuranceCoverageAmount = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.InsuranceCoverageAmount);
                    }

                    ViewBag.MonthlyInsuranceFeeCurrencyType = rqData.dtTbt_QuotationBasic.MonthlyInsuranceFeeCurrencyType;
                    if (rqData.dtTbt_QuotationBasic.MonthlyInsuranceFeeCurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                    {
                        ViewBag.MonthlyInsuranceFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.MonthlyInsuranceFeeUsd);
                    }
                    else
                    {
                        ViewBag.MonthlyInsuranceFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.MonthlyInsuranceFee);
                    }

                    if (mode == MODE_TYPE.AL)
                    {
                        ViewBag.InstallationFeeCurrencyType = rqData.dtTbt_QuotationBasic.InstallationFeeCurrencyType;
                        if (rqData.dtTbt_QuotationBasic.InstallationFeeCurrencyType == SECOM_AJIS.Common.Util.ConstantValue.CurrencyUtil.C_CURRENCY_US)
                        {
                            ViewBag.InstallationFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.InstallationFeeUsd);
                        }
                        else
                        {
                            ViewBag.InstallationFee = CommonUtil.TextNumeric(rqData.dtTbt_QuotationBasic.InstallationFee);
                        }
                    }
                    else if (mode == MODE_TYPE.ONLINE)
                    {
                        ViewBag.ContractCode = rqData.dtTbt_QuotationBasic.SaleOnlineContractCodeShort;

                        if (rqData.doLinkageSaleContractData != null)
                        {
                            ViewBag.PlanCode             = rqData.doLinkageSaleContractData.PlanCode;
                            ViewBag.Planner              = rqData.doLinkageSaleContractData.PlannerCodeName;
                            ViewBag.PlanChecker          = rqData.doLinkageSaleContractData.PlanCheckerCodeName;
                            ViewBag.PlanCheckingDate     = CommonUtil.TextDate(rqData.doLinkageSaleContractData.PlanCheckDate);
                            ViewBag.PlanApprover         = rqData.doLinkageSaleContractData.PlanApproverCodeName;
                            ViewBag.PlanApprovingDate    = CommonUtil.TextDate(rqData.doLinkageSaleContractData.PlanApproveDate);
                            ViewBag.SiteBuildingArea     = CommonUtil.TextNumeric(rqData.doLinkageSaleContractData.SiteBuildingArea);
                            ViewBag.SecurityAreaSizeFrom = CommonUtil.TextNumeric(rqData.doLinkageSaleContractData.SecurityAreaFrom);
                            ViewBag.SecurityAreaSizeTo   = CommonUtil.TextNumeric(rqData.doLinkageSaleContractData.SecurityAreaTo);
                            ViewBag.MainStructureType    = rqData.doLinkageSaleContractData.MainStructureTypeCodeName;
                            ViewBag.NewOldBuilding       = rqData.doLinkageSaleContractData.BuildingTypeCodeName;

                            if (rqData.doLinkageSaleContractData.NewBldMgmtFlag == true)
                            {
                                ViewBag.NewBldMgmtFlag = CommonUtil.GetLabelFromResource(MessageUtil.MODULE_QUOTATION, "QUS012", "rdoNewBuildingMgmtTypeFlagNeed");
                            }
                            else
                            {
                                ViewBag.NewBldMgmtFlag = CommonUtil.GetLabelFromResource(MessageUtil.MODULE_QUOTATION, "QUS012", "rdoNewBuildingMgmtTypeFlagNoNeed");
                            }

                            ViewBag.NewBldMgmtCost = CommonUtil.TextNumeric(rqData.doLinkageSaleContractData.NewBldMgmtCost);
                        }
                    }
                }
                else if (mode == MODE_TYPE.OTHER)
                {
                    ViewBag.ProvidedServiceType = rqData.doQuotationHeaderData.doQuotationTarget.ProvideServiceName;
                }

                return(true);
            }
            catch
            {
            }

            return(false);
        }