示例#1
0
        // Token: 0x06008BF6 RID: 35830 RVA: 0x0028DE78 File Offset: 0x0028C078
        private void PlayFx(string name, Vector3 p)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_PlayFxStringVector3_hotfix != null)
            {
                this.m_PlayFxStringVector3_hotfix.call(new object[]
                {
                    this,
                    name,
                    p
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (string.IsNullOrEmpty(name))
            {
                return;
            }
            GenericGraphic genericGraphic = this.m_clientWorld.FxPlayer.Play(name);

            if (genericGraphic != null)
            {
                genericGraphic.SetSortingOrder(2);
                genericGraphic.SetPosition(p);
                genericGraphic.SetRotation(ClientWorldConst.FaceCameraRotation);
                genericGraphic.AutoDelete(true);
            }
        }
示例#2
0
        // Token: 0x06009760 RID: 38752 RVA: 0x002B41C8 File Offset: 0x002B23C8
        public void PlayOnStageFx(GridPosition pos)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_PlayOnStageFxGridPosition_hotfix != null)
            {
                this.m_PlayOnStageFxGridPosition_hotfix.call(new object[]
                {
                    this,
                    pos
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (this.m_arenaDefendBattle == null)
            {
                return;
            }
            GenericGraphic genericGraphic = this.m_arenaDefendBattle.FxPlayer.Play("FX/Common_ABS/CommonFX/OnTouchMovePlaceInMan/OnTouchEnd_G.prefab");

            if (genericGraphic != null)
            {
                genericGraphic.AutoDelete(true);
                genericGraphic.SetPosition(this.StagePositionToWorldPosition(pos));
            }
        }
示例#3
0
 // Token: 0x0600D809 RID: 55305 RVA: 0x003AC368 File Offset: 0x003AA568
 public void Tick(float dt)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_TickSingle_hotfix != null)
     {
         this.m_TickSingle_hotfix.call(new object[]
         {
             this,
             dt
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     if (this.m_camera == null)
     {
         return;
     }
     this.m_touchStates.Clear();
     for (int i = 0; i < Input.touchCount; i++)
     {
         Touch touch             = Input.GetTouch(i);
         TouchFx.TouchState item = default(TouchFx.TouchState);
         item.phase    = touch.phase;
         item.fingerId = touch.fingerId;
         item.position = touch.position;
         this.m_touchStates.Add(item);
     }
     if (this.m_touchStates.Count == 0)
     {
         for (int j = 0; j < 3; j++)
         {
             if (Input.GetMouseButtonDown(j))
             {
                 TouchFx.TouchState item2 = default(TouchFx.TouchState);
                 item2.phase    = TouchPhase.Began;
                 item2.fingerId = j;
                 item2.position = Input.mousePosition;
                 this.m_touchStates.Add(item2);
             }
             if (Input.GetMouseButtonUp(j))
             {
                 TouchFx.TouchState item3 = default(TouchFx.TouchState);
                 item3.phase    = TouchPhase.Ended;
                 item3.fingerId = j;
                 item3.position = Input.mousePosition;
                 this.m_touchStates.Add(item3);
             }
             if (Input.GetMouseButton(j))
             {
                 TouchFx.TouchState item4 = default(TouchFx.TouchState);
                 item4.phase    = TouchPhase.Moved;
                 item4.fingerId = j;
                 item4.position = Input.mousePosition;
                 this.m_touchStates.Add(item4);
             }
         }
     }
     foreach (TouchFx.TouchState touchState in this.m_touchStates)
     {
         if (touchState.fingerId < this.m_loopFxs.Length)
         {
             Vector3 position = this.m_camera.ScreenToWorldPoint(touchState.position);
             if (touchState.phase == TouchPhase.Began)
             {
                 if (!(this.m_disableInputGameObject != null) || !this.m_disableInputGameObject.activeSelf)
                 {
                     GenericGraphic genericGraphic = this.m_fxPlayer.Play(this.m_hitFxName);
                     if (genericGraphic != null)
                     {
                         genericGraphic.SetPosition(position);
                         genericGraphic.AutoDelete(true);
                     }
                     if (this.m_loopFxs[touchState.fingerId] == null)
                     {
                         this.m_loopFxs[touchState.fingerId] = this.m_fxPlayer.Play(this.m_loopFxName);
                         if (this.m_loopFxs[touchState.fingerId] != null)
                         {
                             this.m_loopFxs[touchState.fingerId].AutoDelete(false);
                         }
                     }
                     if (this.m_loopFxs[touchState.fingerId] != null)
                     {
                         this.m_loopFxs[touchState.fingerId].SetPosition(position);
                     }
                 }
             }
             else if (touchState.phase == TouchPhase.Ended || touchState.phase == TouchPhase.Canceled)
             {
                 if (this.m_loopFxs[touchState.fingerId] != null)
                 {
                     this.m_loopFxs[touchState.fingerId].FxStop(true);
                     this.m_loopFxs[touchState.fingerId] = null;
                 }
             }
             else if (touchState.phase == TouchPhase.Moved && this.m_loopFxs[touchState.fingerId] != null)
             {
                 this.m_loopFxs[touchState.fingerId].SetPosition(position);
             }
         }
     }
     this.m_fxPlayer.Tick(dt);
 }