Beispiel #1
0
        void Awake()
        {
            splatterBranchPrefab = (GameObject)Resources.Load("MeshSplatterBranch");
            if (splatterBranchPrefab == null)
            {
                Debug.LogError("[SPLATTER SYSTEM] Can't find SplatterBranch prefab");
                enabled = false;
                return;
            }

            particles = gameObject.GetComponentInChildren <SplatterParticleProvider>();
            if (particles == null)
            {
                Debug.LogError("[SPLATTER SYSTEM] Can't find SplatterParticleProvider");
                enabled = false;
                return;
            }

            if (defaultSettings != null)
            {
                particles.Configure(defaultSettings);
            }
        }
Beispiel #2
0
 override public void SetDefaultSettings(SplatterSettings settings)
 {
     defaultSettings = settings;
     particles.Configure(settings);
 }