Ejemplo n.º 1
0
 public void SetDownState()
 {
     if (State)
     {
         CrossPlatformInputManager.SetButtonDown(Name);
     }
 }
Ejemplo n.º 2
0
 public void SetDownState()
 {
     CrossPlatformInputManager.SetButtonDown(Name);
     if (colorPress)
     {
         GetComponent <Image> ().color = Color.gray;
     }
 }
        public void SetDownState()
        {
            CrossPlatformInputManager.SetButtonDown(Name);
            GameObject mycube = GameObject.Find("Cube");
            Rigidbody  r      = mycube.GetComponent <Rigidbody>();

            r.AddForce(new Vector3(0, 15, 0));
        }
Ejemplo n.º 4
0
 public void SetDownState()
 {
     player = GameObject.Find("character" + (GameData.player_order[GameData.playing_player - 1]).ToString());
     ani    = player.GetComponent <Animator>();
     ani.SetBool("jump", true);
     //print("jump");
     CrossPlatformInputManager.SetButtonDown(Name);
 }
Ejemplo n.º 5
0
        public void SetDownState()
        {
            if (m_Animator != null)
            {
                m_Animator.SetTrigger("Pressed");
            }

            CrossPlatformInputManager.SetButtonDown(Name);
        }
Ejemplo n.º 6
0
        public void SetDownState()
        {
            CrossPlatformInputManager.SetButtonDown(Name);
            Debug.Log("player.transform.position" + player.transform.position);
            GameObject fireBall = Instantiate(prefab) as GameObject;

            fireBall.transform.position = player.transform.position + offset;
            Rigidbody rb = fireBall.GetComponent <Rigidbody>();

            rb.velocity = new Vector3(0, 0, 10);
        }
Ejemplo n.º 7
0
        public void OnDrag(PointerEventData data)
        {
            Vector3 newPos = Vector3.zero;

            if (m_UseX)
            {
                int delta = (int)(data.position.x - m_StartPos.x);
                //	delta = Mathf.Clamp(delta, - MovementRange, MovementRange);
                newPos.x = delta;
            }

            if (m_UseY)
            {
                int delta = (int)(data.position.y - m_StartPos.y);
                //	delta = Mathf.Clamp(delta, -MovementRange, MovementRange);
                newPos.y = delta;
            }
            CrossPlatformInputManager.SetButtonDown(aimName);

            transform.position = Vector3.ClampMagnitude(new Vector3(newPos.x, newPos.y, newPos.z), MovementRange) + m_StartPos;
            if (newPos.sqrMagnitude > 0f && newPos.sqrMagnitude < shootRange * shootRange)
            {
                CrossPlatformInputManager.SetButtonDown(aimName);
                //    print("aiming");
            }
            else
            {
                CrossPlatformInputManager.SetButtonUp(aimName);
                //  print("not aiming");
            }

            if (newPos.sqrMagnitude >= shootRange * shootRange)
            {
                CrossPlatformInputManager.SetButtonDown(fireString);
            }
            else
            {
                CrossPlatformInputManager.SetButtonUp(fireString);
            }
            UpdateVirtualAxes(transform.position);
        }
Ejemplo n.º 8
0
        public void OnPointerDown()
        {
            TimeSpan span = DateTime.Now - lastDownTime;

            if (span.TotalMilliseconds > 200)
            {
                lastDownTime = DateTime.Now;
                bool  down = CrossPlatformInputManager.GetButton(Name);
                Image img  = GetComponent <Image>();
                if (down)
                {
                    CrossPlatformInputManager.SetButtonUp(Name);
                    img.color = Color.white * 0.8f;
                }
                else
                {
                    CrossPlatformInputManager.SetButtonDown(Name);
                    img.color = Color.cyan * 0.7f;
                }
            }
        }
 // Token: 0x060071F2 RID: 29170 RVA: 0x00237C52 File Offset: 0x00235E52
 public void NKAMIOKIBHO()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
 // Token: 0x06007232 RID: 29234 RVA: 0x00237C52 File Offset: 0x00235E52
 public void LKIKPAPGFKL()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
 // Token: 0x0600723A RID: 29242 RVA: 0x00237C52 File Offset: 0x00235E52
 public void KHBMAEEFPFA()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
 // Token: 0x06007214 RID: 29204 RVA: 0x00237C52 File Offset: 0x00235E52
 public void GIJKOCMNNNM()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
 // Token: 0x06007218 RID: 29208 RVA: 0x00237C52 File Offset: 0x00235E52
 public void FJDCNKOLNMO()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
 // Token: 0x060071E9 RID: 29161 RVA: 0x00237C52 File Offset: 0x00235E52
 public void APBMNONLHFA()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
 // Token: 0x06007212 RID: 29202 RVA: 0x00237C52 File Offset: 0x00235E52
 public void PLPDIBFNLCE()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
 public void SetDownState()
 {
     CrossPlatformInputManager.SetButtonDown(Name);
     image.color = pressedColor;
     image.rectTransform.localScale *= scalePercent;
 }
 // Token: 0x060071E8 RID: 29160 RVA: 0x00237C52 File Offset: 0x00235E52
 public void NMFEFGJMCHG()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
Ejemplo n.º 18
0
 public void SetDownState()
 {
     print("down registered");
     CrossPlatformInputManager.SetButtonDown(Name);
 }
Ejemplo n.º 19
0
 public void SetDownState()
 {
     Debug.Log("DOOOOOOWN");
     CrossPlatformInputManager.SetButtonDown(Name);
 }
Ejemplo n.º 20
0
 public void SetDownState()
 {
     CrossPlatformInputManager.SetButtonDown(Name);
     Debug.Log(Name);
 }
Ejemplo n.º 21
0
 public void SetDownState()
 {
     CrossPlatformInputManager.SetButtonDown(Name);
     ButtonIsPressed();
 }
Ejemplo n.º 22
0
 public void SetDownState()
 {
     CrossPlatformInputManager.SetButtonDown(Name);
     //Do calculation for dodge
 }
Ejemplo n.º 23
0
 public void SetDownState()
 {
     CrossPlatformInputManager.SetButtonDown(Name);
     GetComponent <UnityEngine.UI.Image> ().sprite = ActionImage;
 }
Ejemplo n.º 24
0
        public void SetDownState()
        {
            CrossPlatformInputManager.SetButtonDown(Name);
            NetworkClientUI.SendButtonInfo(Name);

            if (Name == "Fury 1")
            {
                if (mui.GetComponent <UI>().player.name == "Knight" &&
                    vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().knightMFC[0] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().knightMFC[0] * 100);
                    QuestCounter.furyUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Archer" &&
                         vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().archerMFC[0] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().archerMFC[0] * 100);
                    QuestCounter.furyUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Warchief" &&
                         vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().warchiefMFC[0] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().warchiefMFC[0] * 100);
                    QuestCounter.furyUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Berserker" &&
                         vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().berserkerMFC[0] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().berserkerMFC[0] * 100);
                    QuestCounter.furyUse++;
                }
            }

            else if (Name == "Fury 2")
            {
                if (mui.GetComponent <UI>().player.name == "Knight" &&
                    vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().knightMFC[1] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().knightMFC[1] * 100);
                    QuestCounter.furyUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Archer" &&
                         vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().archerMFC[1] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().archerMFC[1] * 100);
                    QuestCounter.furyUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Warchief" &&
                         vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().warchiefMFC[1] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().warchiefMFC[1] * 100);
                    QuestCounter.furyUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Berserker")
                {
                }
            }

            else if (Name == "Fury 3")
            {
                if (mui.GetComponent <UI>().player.name == "Knight")
                {
                }

                else if (mui.GetComponent <UI>().player.name == "Archer" &&
                         vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().archerMFC[2] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().archerMFC[2] * 100);
                    QuestCounter.furyUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Warchief" &&
                         vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().warchiefMFC[2] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().warchiefMFC[2] * 100);
                    QuestCounter.furyUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Berserker" &&
                         vrpy.GetComponent <Healthpoint>().fp >= (int)(vrpy.GetComponent <SkillInfo>().berserkerMFC[2] * 100))
                {
                    vrpy.GetComponent <Healthpoint>().fp -= (int)(vrpy.GetComponent <SkillInfo>().berserkerMFC[2] * 100);
                    QuestCounter.furyUse++;
                }
            }

            else if (Name == "Skill 1")
            {
                if (mui.GetComponent <UI>().player.name == "Knight" &&
                    vrpy.GetComponent <SkillInfo>().knightCD[0, 0] == vrpy.GetComponent <SkillInfo>().knightCD[0, 1])
                {
                    vrpy.GetComponent <SkillInfo>().knightCD[0, 0] = 0;
                    QuestCounter.spellUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Archer" &&
                         vrpy.GetComponent <SkillInfo>().archerCD[0, 0] == vrpy.GetComponent <SkillInfo>().archerCD[0, 1])
                {
                    vrpy.GetComponent <SkillInfo>().archerCD[0, 0] = 0;
                    QuestCounter.spellUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Warchief" &&
                         vrpy.GetComponent <SkillInfo>().warchiefCD[0, 0] == vrpy.GetComponent <SkillInfo>().warchiefCD[0, 1])
                {
                    vrpy.GetComponent <SkillInfo>().warchiefCD[0, 0] = 0;
                    QuestCounter.spellUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Berserker" &&
                         vrpy.GetComponent <SkillInfo>().berserkerCD[0, 0] == vrpy.GetComponent <SkillInfo>().berserkerCD[0, 1])
                {
                    vrpy.GetComponent <SkillInfo>().berserkerCD[0, 0] = 0;
                    QuestCounter.spellUse++;
                }
            }

            else if (Name == "Skill 2")
            {
                if (mui.GetComponent <UI>().player.name == "Knight" &&
                    vrpy.GetComponent <SkillInfo>().knightCD[1, 0] == vrpy.GetComponent <SkillInfo>().knightCD[1, 1])
                {
                    vrpy.GetComponent <SkillInfo>().knightCD[1, 0] = 0;
                    QuestCounter.spellUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Archer" &&
                         vrpy.GetComponent <SkillInfo>().archerCD[1, 0] == vrpy.GetComponent <SkillInfo>().archerCD[1, 1])
                {
                    vrpy.GetComponent <SkillInfo>().archerCD[1, 0] = 0;
                    QuestCounter.spellUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Warchief" &&
                         vrpy.GetComponent <SkillInfo>().warchiefCD[1, 0] == vrpy.GetComponent <SkillInfo>().warchiefCD[1, 1])
                {
                    vrpy.GetComponent <SkillInfo>().warchiefCD[1, 0] = 0;
                    QuestCounter.spellUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Berserker" &&
                         vrpy.GetComponent <SkillInfo>().berserkerCD[1, 0] == vrpy.GetComponent <SkillInfo>().berserkerCD[1, 1])
                {
                    vrpy.GetComponent <SkillInfo>().berserkerCD[1, 0] = 0;
                    QuestCounter.spellUse++;
                }
            }

            else if (Name == "Skill 3")
            {
                if (mui.GetComponent <UI>().player.name == "Knight" &&
                    vrpy.GetComponent <SkillInfo>().knightCD[2, 0] == vrpy.GetComponent <SkillInfo>().knightCD[2, 1])
                {
                    vrpy.GetComponent <SkillInfo>().knightCD[2, 0] = 0;
                    QuestCounter.spellUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Archer" &&
                         vrpy.GetComponent <SkillInfo>().archerCD[2, 0] == vrpy.GetComponent <SkillInfo>().archerCD[2, 1])
                {
                    vrpy.GetComponent <SkillInfo>().archerCD[2, 0] = 0;
                    QuestCounter.spellUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Warchief" &&
                         vrpy.GetComponent <SkillInfo>().warchiefCD[2, 0] == vrpy.GetComponent <SkillInfo>().warchiefCD[2, 1])
                {
                    vrpy.GetComponent <VirturePlayer>().warchiefSkill3.SetActive(true);
                    vrpy.GetComponent <SkillInfo>().warchiefCD[2, 0] = 0;
                    QuestCounter.spellUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Berserker" &&
                         vrpy.GetComponent <SkillInfo>().berserkerCD[2, 0] == vrpy.GetComponent <SkillInfo>().berserkerCD[2, 1])
                {
                    vrpy.GetComponent <SkillInfo>().berserkerCD[2, 0] = 0;
                    QuestCounter.spellUse++;
                }
            }

            else if (Name == "Trail")
            {
                if (mui.GetComponent <UI>().player.name == "Knight" &&
                    vrpy.GetComponent <SkillInfo>().knightCD[3, 0] == vrpy.GetComponent <SkillInfo>().knightCD[3, 1])
                {
                    vrpy.GetComponent <SkillInfo>().knightCD[3, 0]   = 0;
                    vrpy.GetComponent <SkillInfo>().knightBuff[6, 0] = 0;
                    QuestCounter.trailUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Archer" &&
                         vrpy.GetComponent <SkillInfo>().archerCD[3, 0] == vrpy.GetComponent <SkillInfo>().archerCD[3, 1])
                {
                    vrpy.GetComponent <SkillInfo>().archerCD[3, 0]   = 0;
                    vrpy.GetComponent <SkillInfo>().archerBuff[6, 0] = 0;
                    if (mui.GetComponent <UI>().isReverse)
                    {
                        mui.GetComponent <UI>().isReverse = false;
                    }
                    else
                    {
                        mui.GetComponent <UI>().isReverse = true;
                    }
                    QuestCounter.trailUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Warchief" &&
                         vrpy.GetComponent <SkillInfo>().warchiefCD[3, 0] == vrpy.GetComponent <SkillInfo>().warchiefCD[3, 1])
                {
                    vrpy.GetComponent <SkillInfo>().warchiefCD[3, 0]   = 0;
                    vrpy.GetComponent <SkillInfo>().warchiefBuff[6, 0] = 0;
                    QuestCounter.trailUse++;
                }

                else if (mui.GetComponent <UI>().player.name == "Berserker" &&
                         vrpy.GetComponent <SkillInfo>().berserkerCD[3, 0] == vrpy.GetComponent <SkillInfo>().berserkerCD[3, 1])
                {
                    vrpy.GetComponent <SkillInfo>().berserkerCD[3, 0]   = 0;
                    vrpy.GetComponent <SkillInfo>().berserkerBuff[6, 0] = 0;
                    QuestCounter.trailUse++;
                }
            }
        }
Ejemplo n.º 25
0
 public void SetDownState()
 {
     CrossPlatformInputManager.SetButtonDown(Name);
     SoundManager.Instance.PlayClip(ButtonPressedaudioSource);
 }
 // Token: 0x060071F9 RID: 29177 RVA: 0x00237C52 File Offset: 0x00235E52
 public void NPAOJHHNOGJ()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
 // Token: 0x060071FD RID: 29181 RVA: 0x00237C52 File Offset: 0x00235E52
 public void SetDownState()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
 // Token: 0x06007200 RID: 29184 RVA: 0x00237C52 File Offset: 0x00235E52
 public void HILHBGPOIJL()
 {
     CrossPlatformInputManager.SetButtonDown(this.Name);
 }
Ejemplo n.º 29
0
 public void OnPointerDown(PointerEventData data)
 {
     CrossPlatformInputManager.SetButtonDown(Name);
 }
Ejemplo n.º 30
0
 public void SetDownState()
 {
     CrossPlatformInputManager.SetButtonDown(Name);
     ChangeButtonColor(pressedColor);
 }