コード例 #1
0
ファイル: Grid.cs プロジェクト: OursBleu/GameJamStarterKit
    // 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");
    }
コード例 #2
0
ファイル: Grid.cs プロジェクト: OursBleu/GameJamStarterKit
    // 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");
    }