Пример #1
0
 public SimpleOverlay(string textureName, string shaderName = "Default",
                      EffectPriority priority = EffectPriority.VeryLow, RenderLayers layer = RenderLayers.All)
     : base(priority, layer)
 {
     this._texture = TextureManager.AsyncLoad(textureName == null ? "" : textureName);
     this._shader  = new ScreenShaderData(Main.ScreenShaderRef, shaderName);
 }
Пример #2
0
 public SimpleOverlay(string textureName, ScreenShaderData shader,
                      EffectPriority priority = EffectPriority.VeryLow, RenderLayers layer = RenderLayers.All)
     : base(priority, layer)
 {
     this._texture = TextureManager.AsyncLoad(textureName == null ? "" : textureName);
     this._shader  = shader;
 }
Пример #3
0
 public SimpleOverlay(
     string textureName,
     string shaderName       = "Default",
     EffectPriority priority = EffectPriority.VeryLow,
     RenderLayers layer      = RenderLayers.All)
     : base(priority, layer)
 {
     this._texture = (Asset <Texture2D>)Main.Assets.Request <Texture2D>(textureName == null ? "" : textureName, (AssetRequestMode)1);
     this._shader  = new ScreenShaderData(Main.ScreenShaderRef, shaderName);
 }
Пример #4
0
 public FilterManager()
 {
     Main.Configuration.OnLoad += delegate(Preferences preferences)
     {
         _filterLimit = preferences.Get("FilterLimit", 16);
         if (Enum.TryParse <EffectPriority>(preferences.Get("FilterPriorityThreshold", "VeryLow"), out var result))
         {
             _priorityThreshold = result;
         }
     };
     Main.Configuration.OnSave += delegate(Preferences preferences)
     {
         preferences.Put("FilterLimit", _filterLimit);
         preferences.Put("FilterPriorityThreshold", Enum.GetName(typeof(EffectPriority), _priorityThreshold));
     };
 }
Пример #5
0
 public FilterManager()
 {
     Main.Configuration.OnLoad += (Action <Preferences>)(preferences =>
     {
         this._filterLimit = preferences.Get <int>("FilterLimit", 16);
         EffectPriority result;
         if (!Enum.TryParse <EffectPriority>(preferences.Get <string>("FilterPriorityThreshold", "VeryLow"), out result))
         {
             return;
         }
         this._priorityThreshold = result;
     });
     Main.Configuration.OnSave += (Action <Preferences>)(preferences =>
     {
         preferences.Put("FilterLimit", (object)this._filterLimit);
         preferences.Put("FilterPriorityThreshold", (object)Enum.GetName(typeof(EffectPriority), (object)this._priorityThreshold));
     });
 }
Пример #6
0
 public FilterManager()
 {
     Main.Configuration.OnLoad += (Action <Preferences>)(preferences =>
     {
         this._filterLimit = preferences.Get <int>("FilterLimit", 16);
         EffectPriority effectPriority;
         // ISSUE: explicit reference operation
         // ISSUE: cast to a reference type
         if (!Enum.TryParse <EffectPriority>(preferences.Get <string>("FilterPriorityThreshold", "VeryLow"), (M0&)@effectPriority))
         {
             return;
         }
         this._priorityThreshold = effectPriority;
     });
     Main.Configuration.OnSave += (Action <Preferences>)(preferences =>
     {
         preferences.Put("FilterLimit", (object)this._filterLimit);
         preferences.Put("FilterPriorityThreshold", (object)Enum.GetName(typeof(EffectPriority), (object)this._priorityThreshold));
     });
 }
Пример #7
0
 public SimpleOverlay(string textureName, string shaderName = "Default", EffectPriority priority = EffectPriority.VeryLow)
     : base(priority)
 {
     _texture = TextureManager.Retrieve(textureName == null ? "" : textureName);
     _shader  = new ScreenShaderData(Main.screenShader, shaderName);
 }
Пример #8
0
 public SimpleOverlay(string textureName, ScreenShaderData shader, EffectPriority priority = EffectPriority.VeryLow)
     : base(priority)
 {
     _texture = TextureManager.Retrieve(textureName == null ? "" : textureName);
     _shader  = shader;
 }
Пример #9
0
 public CoveringOverlay(EffectPriority priority, RenderLayers layer) : base(priority, layer)
 {
 }
		public SimpleOverlay(string textureName, string shaderName = "Default", EffectPriority priority = EffectPriority.VeryLow) : base(priority)
		{
			this._texture = TextureManager.Retrieve((textureName == null) ? "" : textureName);
			this._shader = new ScreenShaderData(Main.screenShader, shaderName);
		}
Пример #11
0
 public AuroraOverlay(EffectPriority priority = EffectPriority.High, RenderLayers layer = RenderLayers.Sky) : base(priority, layer)
 {
 }
Пример #12
0
        ////////////////

        public CustomEntityOverlay(EffectPriority priority = EffectPriority.VeryHigh, RenderLayers layer = RenderLayers.Walls)
            : base(priority, layer)
        {
        }
Пример #13
0
 public Overlay(EffectPriority priority)
 {
     _priority = priority;
 }
Пример #14
0
 public Overlay(EffectPriority priority)
 {
     _priority = priority;
 }
Пример #15
0
 public AshstormOverlay(EffectPriority priority = 0, RenderLayers layer = RenderLayers.TilesAndNPCs) : base(priority, layer)
 {
     _ashes = new Ash[1000];
 }
Пример #16
0
    //#region 将特效直接挂载到对应的节点上
    //    public string sp_mounts = "Root";
    //
    //    private Dictionary<string, Transform> sp_mountsDictionary = new Dictionary<string, Transform>();
    //
    //#if UNITY_EDITOR
    //    public List<Transform> mountsList = new List<Transform>();
    //#endif
    //
    //    public Person person;
    //
    //    public Transform personTransform;
    //
    //    public ParticleSystemController particleSystemController;
    //
    //
    //    private int maxTryCount = 10;
    //    private int i = 10;
    //
    //    private IEnumerator init()
    //    {
    //        yield return 1;
    //
    //        Transform parentTra = this.transform.parent;
    //
    //        for (;;)
    //        {
    //            yield return 1;
    //
    //            this.person = parentTra.GetComponent<Person>();
    //
    //            if (this.person != null)
    //            {
    //                this.personTransform = this.person.transform;
    //                this.particleSystemController = this.person.GetComponent<ParticleSystemController>();
    //                break;
    //            }
    //
    //            parentTra = parentTra.parent;
    //
    //            if (parentTra == null || i-- < 0)
    //            {
    //                
    //                if (maxTryCount-- < 0)
    //                {
    //                    Debug.LogError("无法找到Person节点!!!" + this.name);
    //                    break;
    //                }
    //
    //                parentTra = this.transform.parent;
    //            }
    //
    //        }
    //
    //        if (this.person == null || this.personTransform == null)
    //        {
    //            Debug.LogError("无法找到Person节点!!!" + this.name);
    //            yield break;
    //        }
    //
    //        {
    //            string[] splits = sp_mounts.Split(';');
    //            bool addInRoot = splits.Contains("Root");
    //
    //            foreach (string split in splits)
    //            {
    //                if (string.IsNullOrEmpty(split) || split.Equals("Root"))
    //                {
    //                    continue;
    //                }
    //
    //                Transform tra = this.personTransform.findInChildrens(split);
    //                if (tag == null)
    //                {
    //                    Debug.LogError("Person中无法找到:" + split + "节点" + this.name);
    //                }
    //                else
    //                {
    //                    sp_mountsDictionary.Add(split, tra);
    //#if UNITY_EDITOR
    //                    mountsList.Add(tra);
    //#endif
    //                    // TODO 需要将自己clone到对应的节点,并设置自己的disable
    //                    GameObject clone = Instantiate(this.gameObject) as GameObject;
    //                    Vector3 localPosition = clone.transform.localPosition;
    //                    Quaternion localRotation = clone.transform.localRotation;
    //                    Vector3 localScale = clone.transform.localScale;
    //                    clone.transform.parent = tra;
    //                    clone.transform.localPosition = localPosition;
    //                    clone.transform.localRotation = localRotation;
    //                    clone.transform.localScale = localScale;
    //
    //                    this.particleSystemController.particleList.Add(clone.gameObject.GetComponent<ParticleItem>());
    //                    this.particleSystemController.particleItemMap.Add(clone.name, clone.gameObject.GetComponent<ParticleItem>());
    //                }
    //            }
    //
    //            if (!addInRoot && !this.name.Contains("(Clone)"))
    //            {
    //                Destroy(this.gameObject);
    //            }
    //        }
    //    }
    //
    //#endregion


    public void play(EffectPriority priority)
    {
        //        foreach (MeshReadererEffect meshReadererEffect in meshReadererEffectList)
        //        {
        //            meshReadererEffect.play();
        //        }
        //
        //        foreach (ParticleSystem item in particleSystemList)
        //        {
        //            item.Play(false);
        //        }

        if (priority == EffectPriority.PERFECT)
        {
            foreach (EffectItem effectItem in effectList_PERFECT)
            {
                playEffect(effectItem);
            }
        }
        else if (priority == EffectPriority.EXCELLENT)
        {
            foreach (EffectItem effectItem in effectList_EXCELLENT)
            {
                playEffect(effectItem);
            }
        }
        else if (priority == EffectPriority.NORMAL)
        {
            foreach (EffectItem effectItem in effectList_NORMAL)
            {
                playEffect(effectItem);
            }
        }
        else if (priority == EffectPriority.LOW)
        {
            foreach (EffectItem effectItem in effectList_LOW)
            {
                playEffect(effectItem);
            }
        }


    }
Пример #17
0
 public Filter(ScreenShaderData shader, EffectPriority priority = EffectPriority.VeryLow)
 {
     this._shader   = shader;
     this._priority = priority;
 }
Пример #18
0
    void OnGUI()
    {
        if (GUI.Button(new Rect(10, Screen.height - 40 * 1, 100, 30), "完美特效"))
        {
            this.priority = EffectPriority.PERFECT;
        }

        if (GUI.Button(new Rect(10, Screen.height - 40 * 2, 100, 30), "优秀特效"))
        {
            this.priority = EffectPriority.EXCELLENT;
        }

        if (GUI.Button(new Rect(10, Screen.height - 40 * 3, 100, 30), "一般特效"))
        {
            this.priority = EffectPriority.NORMAL;
        }

        if (GUI.Button(new Rect(10, Screen.height - 40 * 4, 100, 30), "低特效"))
        {
            this.priority = EffectPriority.LOW;
        }
    }
		public SimpleOverlay(string textureName, ScreenShaderData shader, EffectPriority priority = EffectPriority.VeryLow) : base(priority)
		{
			this._texture = TextureManager.Retrieve((textureName == null) ? "" : textureName);
			this._shader = shader;
		}
 public SimpleOverlay(string textureName, ScreenShaderData shader, EffectPriority priority = EffectPriority.VeryLow, RenderLayers layer = RenderLayers.All)
     : base(priority, layer)
 {
     _texture = Main.Assets.Request <Texture2D>((textureName == null) ? "" : textureName, Main.content, (AssetRequestMode)1);
     _shader  = shader;
 }
Пример #21
0
 public Overlay(EffectPriority priority, RenderLayers layer)
 {
     this._priority = priority;
     this._layer    = layer;
 }
		public Filter(ScreenShaderData shader, EffectPriority priority = EffectPriority.VeryLow)
		{
			this._shader = shader;
			this._priority = priority;
		}