コード例 #1
0
    void Start()
    {
        blockHit                 = GameObject.Find("SceneManager").GetComponent <BlockHit>();
        scoreText                = GameObject.Find("Canvas/BlankWindow/Score/Score").GetComponent <Text>();
        blocksLeftText           = GameObject.Find("Canvas/BlankWindow/NumBlocks/BlocksLeft").GetComponent <Text>();
        dt                       = GameObject.Find("SceneManager").GetComponent <DriftingText>();
        swapButtonPos            = GameObject.Find("Canvas/BlankWindow/SwapAnimal").GetComponent <RectTransform>().TransformPoint(Camera.main.transform.position);
        shooter                  = GameObject.Find("SceneManager").GetComponent <CreateGrid>().shooterPrefab.GetComponent <Shooter>();
        GameData.remainingBlocks = GameData.numCols * GameData.numRows / 2;
        blocksLeftText.text      = GameData.remainingBlocks.ToString("N0");

        //InvokeRepeating("CanIMove", 1f, 0.05f);
    }
コード例 #2
0
ファイル: Play.cs プロジェクト: OutlawGameTools/DeepSeaQuest
    void Start()
    {
        scoring   = GameObject.Find("SceneCode").GetComponent <Scoring>();
        dt        = GameObject.Find("SceneCode").GetComponent <DriftingText>();
        cg        = GameObject.Find("SceneCode").GetComponent <CreateGrid>();
        scenePlay = GameObject.Find("SceneCode").GetComponent <ScenePlay>();

        wholeObjs.Add("diver", bonusDiver);
        wholeObjs.Add("angler", bonusAngler);
        wholeObjs.Add("puffer", bonusPuffer);
        wholeObjs.Add("urchin", bonusUrchin);
        wholeObjs.Add("submarine", bonusSubmarine);
        wholeObjs.Add("mermaid", bonusMermaid);
        wholeObjs.Add("treasurechest", bonusTreasureChest);

        // only show tutorial panel on first level of first world
        tutorial.SetActive(GameData.currWorldNum == 0 && GameData.currLevelNum == 0);
    }