Ejemplo n.º 1
0
    // when the program launches, Grid will check that all the needed elements are in place
    // that's exactly what you do in the static constructor here:
    static Grid()
    {
        GameObject g;

        g = safeFind("__GlobalManagers"); // (some persistent game object)

        animationSystem = (GlobalManagerFrameAnimation)safeComponent(g, "GlobalManagerFrameAnimation");
        particleSystem = (GlobalManagerParticles)safeComponent(g, "GlobalManagerParticles");
    }
Ejemplo n.º 2
0
    // when the program launches, Grid will check that all the needed elements are in place
    // that's exactly what you do in the static constructor here:
    static Grid()
    {
        GameObject g;

        g = safeFind("__GlobalManagers"); // (some persistent game object)

        animationSystem = (GlobalManagerFrameAnimation)safeComponent(g, "GlobalManagerFrameAnimation");
        particleSystem  = (GlobalManagerParticles)safeComponent(g, "GlobalManagerParticles");
    }