Exemplo n.º 1
0
    public static Transform getCleaner()
    {
        if (cleaner == null)
            cleaner = makeCleaner();

        return cleaner.transform;   
    }
Exemplo n.º 2
0
    public static cleanup makeCleaner()
    {
        GameObject cgo = new GameObject("shotCleanup null");
        cleanup cnew = cgo.AddComponent<cleanup>();

        return cnew;
        
    }
Exemplo n.º 3
0
	// Use this for initialization
	void Awake () {
        if (cleaner == null)
        {

            cleaner = this;
        }
        if (cleaner != this)
        {
            Destroy(gameObject);
        }

    }