Exemplo n.º 1
0
    public bool CreateExplosion(Vector3 pos)
    {
        if (MyInfoManager.Instance.IsBelow12())
        {
            Object.Instantiate((Object)explosionEffect11, pos, Quaternion.Euler(0f, 0f, 0f));
        }
        else
        {
            Object.Instantiate((Object)explosionEffect, pos, Quaternion.Euler(0f, 0f, 0f));
        }
        GameObject gameObject = GameObject.Find("Me");

        if (null != gameObject && Vector3.Distance(pos, gameObject.transform.position) < explosionRadius)
        {
            float   num      = pos.y + bombExplosionExceptHigher;
            Vector3 position = gameObject.transform.position;
            if (num > position.y)
            {
                float   num2      = pos.y - bombExplosionExceptLower;
                Vector3 position2 = gameObject.transform.position;
                if (num2 < position2.y)
                {
                    LocalController component = gameObject.GetComponent <LocalController>();
                    if (component != null && !component.IsDead)
                    {
                        component.GetHitBungeeBomb(useUserSeq, 32);
                    }
                }
            }
        }
        return(false);
    }