예제 #1
0
파일: DebugHUD.cs 프로젝트: Gr1nS1de/Rotary
 private void Start()
 {
     m_FpsNextPeriod    = Time.realtimeSinceStartup + fpsMeasurePeriod;
     m_Text             = GetComponent <Text>();
     m_Particles        = GameObject.FindObjectOfType <SplatterParticleProvider>();
     m_ShowNumParticles = m_Particles != null;
 }
예제 #2
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);
            }
        }
예제 #3
0
 override public void SetParticleProvider(MonoBehaviour particleProvider)
 {
     particles = (SplatterParticleProvider)particleProvider;
 }