mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
766d086fbb
* add particle material test case * add game stop
16 lines
520 B
TypeScript
16 lines
520 B
TypeScript
import { director, Node, Scene } from "../../cocos/core";
|
|
import { legacyCC } from "../../cocos/core/global-exports";
|
|
import { ParticleSystem } from "../../exports/particle";
|
|
|
|
test('particle system material test', function () {
|
|
const scene = new Scene('test');
|
|
director.runSceneImmediate(scene);
|
|
|
|
const temp0 = new Node();
|
|
scene.addChild(temp0);
|
|
|
|
const particle = temp0.addComponent(ParticleSystem) as ParticleSystem;
|
|
expect(particle.sharedMaterials).toBeDefined();
|
|
|
|
legacyCC.game.step();
|
|
}); |