예제 #1
0
    public static UILifeTime CreateComponent(GameObject where, float lifetime)
    {
        UILifeTime myC = where.AddComponent <UILifeTime>();

        myC._lifeTime = lifetime;
        return(myC);
    }
예제 #2
0
    private void HighlightEnemy(Transform transform)
    {
        GameObject clone = Instantiate(_highlight, transform, false);

        clone.transform.position = transform.position;

        UILifeTime lifetime = UILifeTime.CreateComponent(clone, _time);
    }