HTSpriteSheet.Awake C# (CSharp) Method

Awake() public method

Awake this instance.
public Awake ( ) : void
return void
    void Awake()
    {
        // Creation of the particle
        CreateParticle();

        // We search the main camera
        mainCamTransform = Camera.main.transform;

        // do we have sound effect ?
        soundEffect = GetComponent<AudioSource>();

        // Add light
        if (addLightEffect){
            gameObject.AddComponent<Light>();
            gameObject.GetComponent<Light>().color = lightColor;
            gameObject.GetComponent<Light>().range = lightRange;
        }

        GetComponent<Renderer>().enabled = false;
    }