コード例 #1
0
    private bool isEnemyShooting = true;                          // flag allows or not to shoot spawning enemy


    void Awake()
    {
        if (instance == null)
            instance = this;
        else if (instance != this)
            Destroy(gameObject);

        DontDestroyOnLoad(gameObject);

        nextGoldenScore = goldenScore;                            // initial first golden Score
        scoreText.text = "0";

        hierarchyGuard = new GameObject("HierarchyGuard").transform;

        // Get references
        bulletTime = GetComponent<BulletTime>();
        medalAwardingFor = GetComponent<MedalAwardingFor>();
        pause = GetComponent<Pause>();
    }
コード例 #2
0
    void Awake()
    {
        if (instance == null)
            instance = this;
        else if (instance != this)
            Destroy(gameObject);

        DontDestroyOnLoad(gameObject);

        nextGoldenScore = goldenScore;                            // initial first golden Score
        scoreText.text = "0";

        hierarchyGuard = new GameObject("HierarchyGuard").transform;

        // Get references
        bulletTime = GetComponent<BulletTime>();
        medalAwardingFor = GetComponent<MedalAwardingFor>();
        pause = GetComponent<Pause>();
    }