之前(這篇)有寫到怎麼抓螢幕的尺寸,為了讓App 可以在不同螢幕尺寸下都能保持全螢幕,可以用以下寫法。
2019/05/21
[C#] WPF Get Screen Width and Height
double screen_h = System.Windows.SystemParameters.PrimaryScreenHeight; double screen_w = System.Windows.SystemParameters.PrimaryScreenWidth;
2019/05/16
2019/05/10
2019/04/23
[Unity] Get Particle System Infomation
Start
END
private ParticleSystem mParticle; private ParticleSystem.MainModule mParticleMainModule; void Start() { mParticle = new ParticleSystem(); mParticle = gameObject.transform.GetChild(0).gameObject.GetComponent<Particlesystem>(); mParticleMainModule = new ParticleSystem.MainModule(); mParticleMainModule = mParticle.main; } void Update() { mParticleMainModule.maxParticles = 100; mParticleMainModule.startSize = 0.3f; }
END
訂閱:
文章 (Atom)