예제 #1
0
    //collision callback, here we release some explode effect at the collison pos.
    void OnMissileCollision(Xft.CollisionParam param)
    {
        XffectComponent eft = EffectCache.GetEffect("explode");

        eft.transform.position = param.CollidePos;
        eft.Active();
    }
예제 #2
0
 void SetUpMagicChain()
 {
     //must call Active First!
     Effect.Active();
     //this API only affect 'Gravity Modifier'.
     Effect.SetGravityGoal(Target.transform, "line");
 }
예제 #3
0
 void SetUpMissile()
 {
     //must call Active() first!
     Effect.Active();
     Effect.SetCollisionGoalPos(Target.transform, "soul");
     Effect.SetGravityGoal(Target.transform, "soul");
 }
    void Fire(XffectComponent xt)
    {
        int index = Random.Range(0, Targets.Length);

        Transform tar = Targets[index];



        Vector3 center = (tar.position + xt.transform.position) * 0.5f;


        //we need to activate first to retrieve the effectlayer list.
        xt.Active();

        //note you may need to check the specific effectlayer's name here.
        XSplineComponent spline = xt.EffectLayerList[0].EmitSpline;

        //build the spline dynamically.
        spline.RemoveAllPointsExceptFirst();
        spline.AppendWorldPoint(center + Vector3.up * 60f);
        spline.AppendWorldPoint(tar.position);
        spline.ReBuild();


        //set collision target
        xt.SetCollisionGoalPos(tar);
    }
예제 #5
0
    //manually emit effect node by expected position.
    public EffectNode EmitNode(string eftName, Vector3 pos)
    {
        List <XffectComponent> cache = EffectDic[eftName];

        if (cache == null)
        {
            Debug.LogError(name + ": cache doesnt exist!");
            return(null);
        }
        if (cache.Count > 1)
        {
            Debug.LogWarning("EmitNode() only support only-one xffect cache!");
        }
        XffectComponent xft = (XffectComponent)cache[0];

        if (!XffectComponent.IsActive(xft.gameObject))
        {
            xft.Active();
        }

        EffectNode ret = xft.EmitByPos(pos);

        if (ret == null)
        {
            Debug.LogError("emit node error! may be node max count is not enough:" + eftName);
        }

        return(ret);
    }
예제 #6
0
 void ActiveEffect(XffectComponent xft)
 {
     QuadExplode.DeActive();
     SphericalExplode.DeActive();
     QuadFogs.DeActive();
     SphericalFogs.DeActive();
     xft.Active();
 }
 void ActiveEffect(XffectComponent xft)
 {
     QuadExplode.DeActive();
     SphericalExplode.DeActive();
     QuadFogs.DeActive();
     SphericalFogs.DeActive();
     xft.Active();
 }
예제 #8
0
    void OnGUI()
    {
        //GUI.Label(new Rect(60, 0, 500, 30), "Requires unity pro to get the best result.");

        if (GUI.Button(new Rect(0, 0, 50, 30), "1"))
        {
            explode_energy.Active();
        }
        if (GUI.Button(new Rect(0, 30, 50, 30), "2"))
        {
            ice_impact.Active();
        }

        if (GUI.Button(new Rect(0, 60, 50, 30), "3"))
        {
            suckblood.Active();
        }

        if (GUI.Button(new Rect(0, 90, 50, 30), "4"))
        {
            firestorm.Active();
        }

        if (GUI.Button(new Rect(0, 120, 50, 30), "5"))
        {
            phantomsword.Active();
        }

        if (GUI.Button(new Rect(0, 150, 50, 30), "6"))
        {
            cyclonestorm.Active();
        }

        if (GUI.Button(new Rect(0, 180, 50, 30), "7"))
        {
            radial_energy.Active();
        }

        if (GUI.Button(new Rect(0, 210, 50, 30), "8"))
        {
            lightning_storm.Active();
        }

        if (GUI.Button(new Rect(0, 240, 50, 30), "9"))
        {
            glow_per_obj.Active();
        }

        if (GUI.Button(new Rect(0, 270, 50, 30), "10"))
        {
            tornado_storm.Active();
        }

        if (GUI.Button(new Rect(0, 300, 50, 30), "Reset"))
        {
            Reset();
        }
    }
예제 #9
0
    protected void AddNodes(int num)
    {
        int added = 0;

        for (int i = 0; i < MaxENodes; i++)
        {
            if (added == num)
            {
                break;
            }
            EffectNode node = AvailableENodes[i];
            if (node != null)
            {
                AddActiveNode(node);
                added++;

                //activate on birth subemitter.
                if (UseSubEmitters && !string.IsNullOrEmpty(BirthSubEmitter))
                {
                    XffectComponent sub = SpawnCache.GetEffect(BirthSubEmitter);
                    if (sub == null)
                    {
                        return;
                    }

                    node.SubEmitter = sub;
                    sub.Active();
                }


                emitter.SetEmitPosition(node);
                float nodeLife     = 0;
                float realNodeLife = 0;
                if (IsNodeLifeLoop)
                {
                    nodeLife     = -1;
                    realNodeLife = Random.Range(NodeLifeMin, NodeLifeMax);
                }
                else
                {
                    nodeLife     = Random.Range(NodeLifeMin, NodeLifeMax);
                    realNodeLife = nodeLife;
                }
                Vector3 oriDir = emitter.GetEmitRotation(node);
                float   speed  = OriSpeed;
                if (IsRandomSpeed)
                {
                    speed = Random.Range(SpeedMin, SpeedMax);
                }
                node.Init(oriDir.normalized, speed, nodeLife, Random.Range(OriRotationMin, OriRotationMax),
                          Random.Range(OriScaleXMin, OriScaleXMax), Random.Range(OriScaleYMin, OriScaleYMax), Color1, UVTopLeft, UVDimension, OriScaleZ, realNodeLife);
            }
            else
            {
                continue;
            }
        }
    }
예제 #10
0
    void InstantiateEffect()
    {
        GameObject      go  = Instantiate(YourEffect.gameObject, Vector3.zero, Quaternion.identity) as GameObject;
        XffectComponent eft = go.GetComponent <XffectComponent>();

        //after you instantiate a Xffect Object, you need to call Active() to activate it
        //and when there are no active nodes in the scene, this Xffect Object will automatically become non-active
        eft.Active();
    }
예제 #11
0
    public XffectComponent ReleaseEffect(string name)
    {
        XffectComponent xft = GetEffect(name);

        if (xft == null)
        {
            //Debug.LogWarning("can't find available effect in cache!:" + name);
            return(null);
        }
        xft.Active();
        return(xft);
    }
예제 #12
0
    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            GameObject      go         = Instantiate(YourEffect.gameObject, Vector3.zero, Quaternion.identity) as GameObject;
            XffectComponent fireEffect = go.GetComponent <XffectComponent>();
            //after you instantiate a Xffect Object, you need to call Active() to activate it
            //and when there are no active nodes in the scene, this Xffect Object will automatically become non-active
            fireEffect.Active();

            //if you fired a loop Xffect Object
            //  fireEffect.Deactive();
        }
    }
예제 #13
0
    //release effect by world position. in this case, the client transform's position should be zero.
    //notice: if the xffect is not auto-deactive, you should remember to manually deactive it.
    //** automaticaly set client to EffectCache, so you should make sure EffectCache's position is always zero.
    public XffectComponent ReleaseEffect(string name, Vector3 pos)
    {
        XffectComponent xft = GetEffect(name);

        if (xft == null)
        {
            Debug.LogWarning("can't find available effect in cache!:" + name);
            return(null);
        }
        xft.Active();
        xft.SetClient(transform);
        xft.SetEmitPosition(pos);
        return(xft);
    }
예제 #14
0
    void OnGUI()
    {
        if (GUI.Button(new Rect(0, 0, 350, 30), "Reset"))
        {
            SampleLoop.Active();
        }

        if (GUI.Button(new Rect(0, 30, 350, 30), "stop effect immediately"))
        {
            SampleLoop.DeActive();
        }

        if (GUI.Button(new Rect(0, 60, 350, 30), "stop effect softly"))
        {
            SampleLoop.StopSmoothly(1f);
        }
    }
예제 #15
0
    //manually emit effect node by expected position.
    public EffectNode EmitNode(string eftName, Vector3 pos)
    {
        ArrayList cache = EffectDic[eftName];

        if (cache == null)
        {
            Debug.LogError(name + ": cache doesnt exist!");
            return(null);
        }
        if (cache.Count > 1)
        {
            Debug.LogWarning("EmitNode() only support only-one xffect cache!");
        }
        XffectComponent xft = (XffectComponent)cache[0];

        if (xft.gameObject.active == false)
        {
            xft.Active();
        }
        return(xft.EmitByPos(pos));
    }
예제 #16
0
 void OnGUI()
 {
     GUI.Label(new Rect(150, 0, 350, 25), "left button to rotate, middle button to pan, wheel to zoom.");
     GUI.Label(new Rect(150, 18, 600, 25), "xffect free version 2.0.0.");
     ScrollPosition = GUI.BeginScrollView(new Rect(0, 0, 140, 600), ScrollPosition, new Rect(0, 0, 140, 690));
     ShowLightBeams = GUI.Toggle(new Rect(10, 0, 80, 20), ShowLightBeams, "LightBeams");
     ShowRaining    = GUI.Toggle(new Rect(10, 20, 80, 20), ShowRaining, "Raining");
     ShowPortalCone = GUI.Toggle(new Rect(10, 40, 80, 20), ShowPortalCone, "PortalCone");
     if (GUI.Button(new Rect(10, 60, 80, 20), "missile3"))
     {
         XMissile3.Active();
         XMissile3.transform.position = new Vector3(0, 0, 40);
         SimpleMissile smile = XMissile3.transform.GetComponent <SimpleMissile>();
         smile.Reset();
     }
     if (GUI.Button(new Rect(10, 80, 80, 20), "explosion3"))
     {
         XExplode3.Active();
     }
     ShowVolumetricLight1 = GUI.Toggle(new Rect(10, 100, 120, 20), ShowVolumetricLight1, "VolumetricLight1");
     GUI.EndScrollView();
 }
예제 #17
0
    void Update()
    {
        if (ShowLightBeams)
        {
            XLightBeams.Active();
        }
        else
        {
            XLightBeams.DeActive();
        }
        if (ShowRaining)
        {
            XRaining.Active();
        }
        else
        {
            XRaining.DeActive();
        }

        if (ShowPortalCone)
        {
            XPortalCone.Active();
        }
        else
        {
            XPortalCone.DeActive();
        }

        if (ShowVolumetricLight1)
        {
            XVolumetricLight1.Active();
        }
        else
        {
            XVolumetricLight1.DeActive();
        }
    }
예제 #18
0
    void ReleasePooledEffect(string effectName)
    {
        XffectComponent eft = EffectPool.GetEffect(effectName);

        eft.Active();
    }
예제 #19
0
    void Update()
    {
        if (ShowLightBeams)
        {
            XLightBeams.Active();
        }
        else
        {
            XLightBeams.DeActive();
        }
        if (ShowRaining)
        {
            XRaining.Active();
        }
        else
        {
            XRaining.DeActive();
        }

        if (ShowVolumeFog)
        {
            XffectComponent.SetActive(XVolumeFog.gameObject, true);
        }
        else
        {
            XffectComponent.SetActive(XVolumeFog.gameObject, false);
        }

        if (ShowWaterfall)
        {
            XWaterfall.Active();
        }
        else
        {
            XWaterfall.DeActive();
        }
        if (ShowPortalCone)
        {
            XPortalCone.Active();
        }
        else
        {
            XPortalCone.DeActive();
        }

        if (ShowTadpoleGate)
        {
            XTadpoleGate.Active();
        }
        else
        {
            XTadpoleGate.DeActive();
        }

        if (ShowCrystalEnergy)
        {
            XCrystalEnergy.Active();
        }
        else
        {
            XCrystalEnergy.DeActive();
        }

        if (ShowSurroundSoul)
        {
            XSurroundSoul.Active();
        }
        else
        {
            XSurroundSoul.DeActive();
        }

        if (ShowPhantomSwordSlash)
        {
            XPhantomSwordSlash.Active();
        }
        else
        {
            XPhantomSwordSlash.DeActive();
        }

        if (ShowPhantomSword)
        {
            XPhantomSword.Active();
        }
        else
        {
            XPhantomSword.DeActive();
        }

        if (ShowTransformSpell)
        {
            XTransformSpell.Active();
        }
        else
        {
            XTransformSpell.DeActive();
        }

        if (ShowSpreadSlash)
        {
            XSpreadSlash.Active();
        }
        else
        {
            XSpreadSlash.DeActive();
        }

        if (ShowPinkSoul)
        {
            XPinkSoul.Active();
        }
        else
        {
            XPinkSoul.DeActive();
        }

        if (ShowSakura)
        {
            XSakura.Active();
        }
        else
        {
            XSakura.DeActive();
        }

        if (ShowIceImpact)
        {
            XIceImpact.Active();
        }
        else
        {
            XIceImpact.DeActive();
        }

        if (ShowWindowLight)
        {
            XWindowLight.Active();
        }
        else
        {
            XWindowLight.DeActive();
        }

        if (ShowVolumetricLight1)
        {
            XVolumetricLight1.Active();
        }
        else
        {
            XVolumetricLight1.DeActive();
        }

        if (ShowVolumetricLight2)
        {
            XVolumetricLight2.Active();
        }
        else
        {
            XVolumetricLight2.DeActive();
        }

        if (ShowSuckBlood)
        {
            XSuckBlood.Active();
        }
        else
        {
            XSuckBlood.DeActive();
        }

        if (ShowCyclone2)
        {
            Cyclone2.Active();
        }
        else
        {
            Cyclone2.DeActive();
        }

        if (ShowCyclone3)
        {
            Cyclone3.Active();
        }
        else
        {
            Cyclone3.DeActive();
        }

        if (ShowDevilTrigger)
        {
            DevilTrigger.Active();
        }
        else
        {
            DevilTrigger.DeActive();
        }

        if (ShowMeshFogVolume)
        {
            MeshFogVolume.Active();
        }
        else
        {
            MeshFogVolume.DeActive();
        }

        if (ShowGlowTrails)
        {
            GlowTrails.Active();
        }
        else
        {
            GlowTrails.DeActive();
        }
    }
예제 #20
0
    void OnGUI()
    {
        GUI.Label(new Rect(150, 0, 350, 25), "left button to rotate, middle button to pan, wheel to zoom.");
        GUI.Label(new Rect(200, 18, 200, 25), "xffect pro version 3.0.0");

        ScrollPosition    = GUI.BeginScrollView(new Rect(0, 0, 140, 600), ScrollPosition, new Rect(0, 0, 140, 800));
        ShowLightBeams    = GUI.Toggle(new Rect(10, 0, 80, 20), ShowLightBeams, "LightBeams");
        ShowRaining       = GUI.Toggle(new Rect(10, 20, 80, 20), ShowRaining, "Raining");
        ShowVolumeFog     = GUI.Toggle(new Rect(10, 40, 80, 20), ShowVolumeFog, "VolumeFog");
        ShowWaterfall     = GUI.Toggle(new Rect(10, 60, 80, 20), ShowWaterfall, "Waterfall");
        ShowPortalCone    = GUI.Toggle(new Rect(10, 100, 80, 20), ShowPortalCone, "PortalCone");
        ShowTadpoleGate   = GUI.Toggle(new Rect(10, 120, 80, 20), ShowTadpoleGate, "TadpoleGate");
        ShowCrystalEnergy = GUI.Toggle(new Rect(10, 140, 120, 20), ShowCrystalEnergy, "CrystalEnergy");
        ShowSurroundSoul  = GUI.Toggle(new Rect(10, 160, 120, 20), ShowSurroundSoul, "SwingAround");

        if (GUI.Button(new Rect(10, 80, 120, 20), "RadialEnergy"))
        {
            XffectComponent.SetActive(BackgroundWallBottom.gameObject, true);
            m_checkTime = 0f;
            XRadialEnergy.Active();
        }


        if (GUI.Button(new Rect(10, 190, 80, 20), "collision1"))
        {
            XCollisionTest1.Active();
            //show colliders.
            foreach (Transform child in Colliders)
            {
                XffectComponent.SetActive(child.gameObject, true);
            }
            XffectComponent.SetActive(Colliders.gameObject, true);
        }

        if (GUI.Button(new Rect(10, 210, 80, 20), "collision2"))
        {
            XCollisionTest2.Active();
            //set collision goal.
            XCollisionTest2.SetCollisionGoalPos(CollisionGoal);
            //show colliders.
            foreach (Transform child in Colliders)
            {
                XffectComponent.SetActive(child.gameObject, true);
            }
            XffectComponent.SetActive(Colliders.gameObject, true);
        }

        if (GUI.Button(new Rect(10, 240, 80, 20), "missile1"))
        {
            XMissile1.Active();
            XMissile1.transform.position = new Vector3(0, 0, 50);
            SimpleMissile smile = XMissile1.transform.GetComponent <SimpleMissile>();
            smile.Reset();
        }
        if (GUI.Button(new Rect(10, 260, 80, 20), "missile2"))
        {
            XMissile2.Active();
            XMissile2.transform.position = new Vector3(0, 0, 40);
            SimpleMissile smile = XMissile2.transform.GetComponent <SimpleMissile>();
            smile.Reset();
        }
        if (GUI.Button(new Rect(10, 280, 80, 20), "missile3"))
        {
            XMissile3.Active();
            XMissile3.transform.position = new Vector3(0, 0, 40);
            SimpleMissile smile = XMissile3.transform.GetComponent <SimpleMissile>();
            smile.Reset();
        }
        if (GUI.Button(new Rect(10, 300, 80, 20), "missile4"))
        {
            XMissile4.transform.position = new Vector3(0, 0, 40);
            XMissile4.Active();
            SimpleMissile smile = XMissile4.transform.GetComponent <SimpleMissile>();
            smile.Reset();
        }


        if (GUI.Button(new Rect(10, 330, 80, 20), "explosion1"))
        {
            XffectComponent.SetActive(BackgroundWallBottom.gameObject, true);
            m_checkTime = 0f;
            XExplode1.Active();
        }
        if (GUI.Button(new Rect(10, 350, 80, 20), "explosion2"))
        {
            XExplode2.Active();
        }
        if (GUI.Button(new Rect(10, 370, 80, 20), "explosion3"))
        {
            XExplode3.Active();
        }

        if (GUI.Toggle(new Rect(10, 390, 120, 20), ShowPhantomSwordSlash, "PhantomSlash"))
        {
            ShowPhantomSwordSlash = true;
            m_checkTime           = 0f;
            XffectComponent.SetActive(BackgroundWallBottom.gameObject, true);
        }
        else
        {
            ShowPhantomSwordSlash = false;
        }
        ShowPhantomSword = GUI.Toggle(new Rect(10, 410, 120, 20), ShowPhantomSword, "PhantomSword");

        ShowTransformSpell = GUI.Toggle(new Rect(10, 430, 120, 20), ShowTransformSpell, "TransformSpell");

        if (GUI.Button(new Rect(10, 450, 100, 20), "BombAffector"))
        {
            XBombAffector.Active();
        }
        //ver 1.2.1
        ShowSpreadSlash = GUI.Toggle(new Rect(10, 470, 120, 20), ShowSpreadSlash, "SpreadSlash");
        ShowPinkSoul    = GUI.Toggle(new Rect(10, 490, 120, 20), ShowPinkSoul, "PinkSoul");
        ShowSakura      = GUI.Toggle(new Rect(10, 510, 120, 20), ShowSakura, "Sakura");

        //ver 1.2.2
        if (GUI.Button(new Rect(10, 530, 100, 20), "LevelUp"))
        {
            XLevelUp.Active();
        }

        //ver 1.2.3
        ShowIceImpact = GUI.Toggle(new Rect(10, 550, 120, 20), ShowIceImpact, "IceImpact");


        //ver 1.3.1
        if (GUI.Button(new Rect(10, 570, 80, 20), "Dissolve"))
        {
            XffectComponent.SetActive(BackgroundWallBottom.gameObject, true);
            m_checkTime = 0f;
            XDissolve.Active();
        }

        ShowWindowLight      = GUI.Toggle(new Rect(10, 590, 120, 20), ShowWindowLight, "WindowLight");
        ShowVolumetricLight1 = GUI.Toggle(new Rect(10, 610, 120, 20), ShowVolumetricLight1, "VolumetricLight1");
        ShowVolumetricLight2 = GUI.Toggle(new Rect(10, 630, 120, 20), ShowVolumetricLight2, "VolumetricLight2");

        ShowSuckBlood = GUI.Toggle(new Rect(10, 650, 120, 20), ShowSuckBlood, "SuckBlood");

        if (GUI.Button(new Rect(10, 670, 120, 20), "Cyclone1"))
        {
            Cyclone1.Active();
        }

        ShowCyclone2      = GUI.Toggle(new Rect(10, 690, 120, 20), ShowCyclone2, "Cyclone2");
        ShowCyclone3      = GUI.Toggle(new Rect(10, 710, 120, 20), ShowCyclone3, "Cyclone3");
        ShowDevilTrigger  = GUI.Toggle(new Rect(10, 730, 120, 20), ShowDevilTrigger, "Devil Trigger");
        ShowMeshFogVolume = GUI.Toggle(new Rect(10, 750, 120, 20), ShowMeshFogVolume, "MeshFogVolume");
        ShowGlowTrails    = GUI.Toggle(new Rect(10, 770, 120, 20), ShowGlowTrails, "GlowTrails");

        GUI.EndScrollView();
    }
예제 #21
0
 // Use this for initialization
 void Start()
 {
     theEffect = GameObject.Find("EffectCache").GetComponent<XffectCache>().GetEffect(xffectName);
     theEffect.Active();
     theEffect.transform.position = transform.position;
 }
예제 #22
0
    void Update()
    {
        if (ShowLightBeams)
        {
            XLightBeams.Active();
        }
        else
        {
            XLightBeams.DeActive();
        }
        if (ShowRaining)
        {
            XRaining.Active();
        }
        else
        {
            XRaining.DeActive();
        }

        //removed since ver 1.2.3
        //if (ShowSnowing)
        //    XSnowing.Active();
        //else
        //    XSnowing.DeActive();

        if (ShowVolumeFog)
        {
            XVolumeFog.gameObject.active = true;
        }
        else
        {
            XVolumeFog.gameObject.active = false;
        }

        if (ShowWaterfall)
        {
            XWaterfall.Active();
        }
        else
        {
            XWaterfall.DeActive();
        }

        if (ShowSeaWave)
        {
            XSeaWave.Active();
        }
        else
        {
            XSeaWave.DeActive();
        }

        if (ShowPortalCone)
        {
            XPortalCone.Active();
        }
        else
        {
            XPortalCone.DeActive();
        }

        if (ShowTadpoleGate)
        {
            XTadpoleGate.Active();
        }
        else
        {
            XTadpoleGate.DeActive();
        }

        if (ShowCrystalEnergy)
        {
            XCrystalEnergy.Active();
        }
        else
        {
            XCrystalEnergy.DeActive();
        }

        if (ShowSurroundSoul)
        {
            XSurroundSoul.Active();
        }
        else
        {
            XSurroundSoul.DeActive();
        }

        if (ShowPhantomSwordSlash)
        {
            XPhantomSwordSlash.Active();
        }
        else
        {
            XPhantomSwordSlash.DeActive();
        }

        if (ShowPhantomSword)
        {
            XPhantomSword.Active();
        }
        else
        {
            XPhantomSword.DeActive();
        }

        if (ShowTransformSpell)
        {
            XTransformSpell.Active();
        }
        else
        {
            XTransformSpell.DeActive();
        }

        if (ShowSpreadSlash)
        {
            XSpreadSlash.Active();
        }
        else
        {
            XSpreadSlash.DeActive();
        }

        if (ShowPinkSoul)
        {
            XPinkSoul.Active();
        }
        else
        {
            XPinkSoul.DeActive();
        }

        if (ShowSakura)
        {
            XSakura.Active();
        }
        else
        {
            XSakura.DeActive();
        }

        if (ShowIceImpact)
        {
            XIceImpact.Active();
        }
        else
        {
            XIceImpact.DeActive();
        }
    }
예제 #23
0
    void Update()
    {
        if (ShowLightBeams)
        {
            XLightBeams.Active();
        }
        else
        {
            XLightBeams.DeActive();
        }
        if (ShowRaining)
        {
            XRaining.Active();
        }
        else
        {
            XRaining.DeActive();
        }

        if (ShowVolumeFog)
        {
            XVolumeFog.gameObject.active = true;
        }
        else
        {
            XVolumeFog.gameObject.active = false;
        }

        if (ShowWaterfall)
        {
            XWaterfall.Active();
        }
        else
        {
            XWaterfall.DeActive();
        }
        if (ShowPortalCone)
        {
            XPortalCone.Active();
        }
        else
        {
            XPortalCone.DeActive();
        }

        if (ShowTadpoleGate)
        {
            XTadpoleGate.Active();
        }
        else
        {
            XTadpoleGate.DeActive();
        }

        if (ShowCrystalEnergy)
        {
            XCrystalEnergy.Active();
        }
        else
        {
            XCrystalEnergy.DeActive();
        }

        if (ShowSurroundSoul)
        {
            XSurroundSoul.Active();
        }
        else
        {
            XSurroundSoul.DeActive();
        }

        if (ShowPhantomSwordSlash)
        {
            XPhantomSwordSlash.Active();
        }
        else
        {
            XPhantomSwordSlash.DeActive();
        }

        if (ShowPhantomSword)
        {
            XPhantomSword.Active();
        }
        else
        {
            XPhantomSword.DeActive();
        }

        if (ShowTransformSpell)
        {
            XTransformSpell.Active();
        }
        else
        {
            XTransformSpell.DeActive();
        }

        if (ShowSpreadSlash)
        {
            XSpreadSlash.Active();
        }
        else
        {
            XSpreadSlash.DeActive();
        }

        if (ShowPinkSoul)
        {
            XPinkSoul.Active();
        }
        else
        {
            XPinkSoul.DeActive();
        }

        if (ShowSakura)
        {
            XSakura.Active();
        }
        else
        {
            XSakura.DeActive();
        }

        if (ShowIceImpact)
        {
            XIceImpact.Active();
        }
        else
        {
            XIceImpact.DeActive();
        }

        if (ShowWindowLight)
        {
            XWindowLight.Active();
        }
        else
        {
            XWindowLight.DeActive();
        }

        if (ShowVolumetricLight1)
        {
            XVolumetricLight1.Active();
        }
        else
        {
            XVolumetricLight1.DeActive();
        }

        if (ShowVolumetricLight2)
        {
            XVolumetricLight2.Active();
        }
        else
        {
            XVolumetricLight2.DeActive();
        }

        if (ShowSuckBlood)
        {
            XSuckBlood.Active();
        }
        else
        {
            XSuckBlood.DeActive();
        }
    }
예제 #24
0
    void OnGUI()
    {
        GUI.Label(new Rect(150, 0, 350, 25), "left button to rotate, middle button to pan, wheel to zoom.");
        GUI.Label(new Rect(200, 18, 200, 25), "xffect pro version 1.3.0");

        ScrollPosition    = GUI.BeginScrollView(new Rect(0, 0, 140, 600), ScrollPosition, new Rect(0, 0, 140, 640));
        ShowLightBeams    = GUI.Toggle(new Rect(10, 0, 80, 20), ShowLightBeams, "LightBeams");
        ShowRaining       = GUI.Toggle(new Rect(10, 20, 80, 20), ShowRaining, "Raining");
        ShowVolumeFog     = GUI.Toggle(new Rect(10, 40, 80, 20), ShowVolumeFog, "VolumeFog");
        ShowWaterfall     = GUI.Toggle(new Rect(10, 60, 80, 20), ShowWaterfall, "Waterfall");
        ShowSeaWave       = GUI.Toggle(new Rect(10, 80, 80, 20), ShowSeaWave, "SeaWave");
        ShowPortalCone    = GUI.Toggle(new Rect(10, 100, 80, 20), ShowPortalCone, "PortalCone");
        ShowTadpoleGate   = GUI.Toggle(new Rect(10, 120, 80, 20), ShowTadpoleGate, "TadpoleGate");
        ShowCrystalEnergy = GUI.Toggle(new Rect(10, 140, 120, 20), ShowCrystalEnergy, "CrystalEnergy");
        ShowSurroundSoul  = GUI.Toggle(new Rect(10, 160, 120, 20), ShowSurroundSoul, "SwingAround");

        if (GUI.Button(new Rect(10, 190, 80, 20), "collision1"))
        {
            XCollisionTest1.Active();
            //show colliders.
            foreach (Transform child in Colliders)
            {
                child.gameObject.active = true;
            }
            Colliders.gameObject.active = true;
        }

        if (GUI.Button(new Rect(10, 210, 80, 20), "collision2"))
        {
            XCollisionTest2.Active();
            //show colliders.
            foreach (Transform child in Colliders)
            {
                child.gameObject.active = true;
            }
            Colliders.gameObject.active = true;
        }

        if (GUI.Button(new Rect(10, 240, 80, 20), "missile1"))
        {
            XMissile1.Active();
            XMissile1.transform.position = new Vector3(0, 0, 50);
            SimpleMissile smile = XMissile1.transform.GetComponent <SimpleMissile>();
            smile.Reset();
        }
        if (GUI.Button(new Rect(10, 260, 80, 20), "missile2"))
        {
            XMissile2.Active();
            XMissile2.transform.position = new Vector3(0, 0, 40);
            SimpleMissile smile = XMissile2.transform.GetComponent <SimpleMissile>();
            smile.Reset();
        }
        if (GUI.Button(new Rect(10, 280, 80, 20), "missile3"))
        {
            XMissile3.Active();
            XMissile3.transform.position = new Vector3(0, 0, 40);
            SimpleMissile smile = XMissile3.transform.GetComponent <SimpleMissile>();
            smile.Reset();
        }
        if (GUI.Button(new Rect(10, 300, 80, 20), "missile4"))
        {
            XMissile4.transform.position = new Vector3(0, 0, 40);
            XMissile4.Active();
            SimpleMissile smile = XMissile4.transform.GetComponent <SimpleMissile>();
            smile.Reset();
        }


        if (GUI.Button(new Rect(10, 330, 80, 20), "explosion1"))
        {
            XExplode1.Active();
        }
        if (GUI.Button(new Rect(10, 350, 80, 20), "explosion2"))
        {
            XExplode2.Active();
        }
        if (GUI.Button(new Rect(10, 370, 80, 20), "explosion3"))
        {
            XExplode3.Active();
        }

        if (GUI.Toggle(new Rect(10, 390, 120, 20), ShowPhantomSwordSlash, "PhantomSlash"))
        {
            ShowPhantomSwordSlash             = true;
            BackgroundWall.gameObject.active  = true;
            BackgroundWall2.gameObject.active = true;
        }
        else
        {
            ShowPhantomSwordSlash             = false;
            BackgroundWall.gameObject.active  = false;
            BackgroundWall2.gameObject.active = false;
        }
        ShowPhantomSword = GUI.Toggle(new Rect(10, 410, 120, 20), ShowPhantomSword, "PhantomSword");

        ShowTransformSpell = GUI.Toggle(new Rect(10, 430, 120, 20), ShowTransformSpell, "TransformSpell");

        if (GUI.Button(new Rect(10, 450, 100, 20), "BombAffector"))
        {
            XBombAffector.Active();
        }
        //ver 1.2.1
        ShowSpreadSlash = GUI.Toggle(new Rect(10, 470, 120, 20), ShowSpreadSlash, "SpreadSlash");
        ShowPinkSoul    = GUI.Toggle(new Rect(10, 490, 120, 20), ShowPinkSoul, "PinkSoul");
        ShowSakura      = GUI.Toggle(new Rect(10, 510, 120, 20), ShowSakura, "Sakura");

        //ver 1.2.2
        if (GUI.Button(new Rect(10, 530, 100, 20), "LevelUp"))
        {
            XLevelUp.Active();
        }

        //ver 1.2.3
        if (GUI.Toggle(new Rect(10, 550, 120, 20), ShowIceImpact, "IceImpact"))
        {
            BackgroundWallBottom.gameObject.active = true;
            ShowIceImpact = true;
        }
        else
        {
            BackgroundWallBottom.gameObject.active = false;
            ShowIceImpact = false;
        }

        GUI.EndScrollView();
    }