RemoveMeshLineFromActiveList() public method

public RemoveMeshLineFromActiveList ( GameObject meshLineGO ) : void
meshLineGO GameObject
return void
Beispiel #1
0
    /*
     * void Awake()
     * {
     *      lineTransform = transform.GetChild(0); // assuming only child
     * }
     */

    // Update is called once per frame
    void Update()
    {
        lifeTimeCounter += Time.deltaTime;

        if (lifeTimeCounter > maxLifeTime)
        {
            lifeTimeCounter = 0;
            gameObject.SetActive(false);
            meshlinesGenerator.RemoveMeshLineFromActiveList(gameObject);
        }
    }