コード例 #1
0
    void Start()
    {
        gameManager  = GameManager.Instance;
        stageManager = FindObjectOfType <StageManager>();
        poolManager  = FindObjectOfType <UnitPooling>();

        spawnPosition = gameManager.GetUnitSpawnPosition();
        spawnCostText = transform.GetChild(1).GetComponent <Text>();
    }
コード例 #2
0
    void Start()
    {
        fusionManager = FindObjectOfType <FusionManager>();

        stageManager = FindObjectOfType <StageManager>();
        poolManager  = FindObjectOfType <UnitPooling>();

        levelText = Lev.GetComponent <TextMesh>();

        mapSliderScript = FindObjectOfType <MapSliderScript>();

        _unitOnMiniMap = Instantiate(unitOnMiniMap.gameObject, GameObject.Find("MapSlider").transform);

        UnitOnMiniMapScript unitOnMiniMapScript = _unitOnMiniMap.GetComponent <UnitOnMiniMapScript>();

        unitOnMiniMapScript.targetObject  = gameObject;
        unitOnMiniMapScript.targetUnitTrm = gameObject.transform;

        SpawnSet();
    }