Creating instance of particles from code with no effort
Inheritance: MonoBehaviour
 /// <summary>
 /// Instantiation callback
 /// </summary>
 void Awake()
 {
     if (Instance != null) {
         Debug.LogError("Multiple instances of SpecialEffectsHelper!");
     }
     Instance = this;
 }
示例#2
0
	void Awake() {
		// Register the singleton
		if (Instance != null) {
			Debug.LogError("Multiple instances of SpecialEffectsHelper!");
		}
		
		Instance = this;
	}
 void Awake()
 {
     if (Instance != null)
     {
         Debug.LogError("Multiple instances of SpecialEffectsHelper!");
     }
     Instance = this;
 }
示例#4
0
 void Awake()
 {
     if (Instance != null)
     {
         Debug.LogError("Несколкьо экземпляров SpecialEffectsHelper!");
     }
     Instance = this;
 }
示例#5
0
 void Awake()
 {
     if (instance != null)
     {
         Debug.Log("too much objects");
     }
     instance = this;
 }
 void Awake()
 {
     // Register the singleton
     if (Instance != null)
     {
         Debug.LogError("Multiple instances of SpecialEffectsHelper!");
     }
     Instance = this;
 }
    void Awake()
    {
        // Register the singleton
                if (Instance != null) {
                        Debug.LogError ("Multiple instances");
                }

                Instance = this;
    }
    void Awake()
    {
        if (Instance != null)
        {
            Debug.LogError("Несколько экземпляров");
        }

        Instance = this;
    }
示例#9
0
    void Awake()
    {
        //регистрация синглтона
        if (Instance != null)
        {
            Debug.LogError("Несколько экземпляров SpecialEffectsHelper!");
        }

        Instance = this;
    }
    void Awake()
    {
        // On garde une référence du singleton
        if (Instance != null)
        {
            Debug.LogError("Multiple instances of SpecialEffectsHelper!");
        }

        Instance = this;
    }
    void Awake()
    {
        // Register the singleton
        if (Instance != null)
        {
          Destroy(gameObject);
        }

        Instance = this;
    }
    void Awake()
    {
        // On garde une référence du singleton
        if (Instance != null)
        {
            Debug.LogError("Multiple instances of SpecialEffectsHelper!");
        }

        Instance = this;
    }
示例#13
0
    private void Awake()
    {
        // Singletone register
        if (Instance != null)
        {
            Debug.LogError("More than one exemple of SpecialEffectsHelper.");
        }

        Instance = this;
    }
示例#14
0
    void Awake()
    {
        smokeEffect = Resources.Load <ParticleSystem>("ShockFlash");
        // регистрация синглтона
        if (Instance != null)
        {
            Debug.LogError("Несколько экземпляров SpecialEffectsHelper!");
        }

        Instance = this;
    }
示例#15
0
 void Awake()
 {
     if (instance != null)
     {
         return;
     }
     else
     {
         instance = this;
     }
 }
示例#16
0
 void Awake()
 {
     if (_instance == null)
     {
         //If I'm the first instance, make me a Singleton
         _instance = this;
         DontDestroyOnLoad(this);
     }
     else
     {
         //If a Singleton already exists and you find another reference in scene, destroy this GameObject!
         if (this != _instance)
         {
             Destroy(this.gameObject);
         }
     }
 }
 void Awake()
 {
     //memory cell hidden
     //set up target number of enemies
     MemCell.SetActive (false);
     targetComp.text = "0/" + target;
     if (Instance != null)
     {
         //simple debugging
         Debug.LogError("Multiple instances of SpecialEffectsHelper!");
     }
     currentKilled = 0;
     Instance = this;
     sound = GetComponent<AudioSource> ();
 }
    void Awake()
    {
        // Register the singleton

        Instance = this;
    }