Beispiel #1
0
    void Start()
    {
        gamemanager  = GameObject.Find("GameManager").GetComponent <GameManager>();
        unitdatabase = GameObject.Find("UnitDataBase").GetComponent <UnitDataBase>();
        //お客さんをセットする
        SetUnit();

        guage.color = Vector4.one * 0.2f;
    }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        canvasTran    = this.gameObject.transform;
        rectTransform = GetComponent <RectTransform>();


        text       = transform.Find("Text");
        textobj    = text.gameObject;
        textdetail = textobj.GetComponent <Text>();

        unitdatabase = GameObject.Find("UnitDataBase").GetComponent <UnitDataBase>();
        FindUnitObj();
        TextSet();
    }
Beispiel #3
0
    /// <summary>
    /// Awake this instance.
    /// Get data from JSON file, initial some temp Data member and construct database
    /// Create classTypeIndex to help set modifier for attribute later base on class.
    /// </summary>
    void Awake()
    {
        _instance      = this;
        classTypeIndex = new List <string>();
        classTypeIndex.Add("Swordsman");
        classTypeIndex.Add("Guardian");
        classTypeIndex.Add("Alchemist");
        classTypeIndex.Add("Magician");
        classTypeIndex.Add("Rouge");
        classTypeIndex.Add("Archer");


        ConstructCharacterDatabase();
    }
Beispiel #4
0
    // Start is called before the first frame update
    void Start()
    {
        //テキスト表示のオブジェクトを所得
        for (i = 0; i < 3; i++)
        {
            text[i]    = transform.Find("Text" + i);
            textobj[i] = text[i].gameObject;
        }

        //画像の初期化
        nowSprite        = null;
        iconImage.sprite = nowSprite;

        //各ドロップの機構にお客さんをセットする
        unitdatabase = GameObject.Find("UnitDataBase").GetComponent <UnitDataBase>();
        Init_SetUnit();

        //テキストデータを付与する
        TextSet();
    }
Beispiel #5
0
    // Start is called before the first frame update
    void Start()
    {
        //画像の初期化
        nowSprite        = null;
        iconImage.sprite = nowSprite;

        //お客さんの候補をデータベースより取得
        unitdatabase    = GameObject.Find("UnitDataBase").GetComponent <UnitDataBase>();
        this.unitobject = unitdatabase.unitobject;
        this.unitname   = unitdatabase.unitname;

        this.unitimage = new Sprite[unitobject.Length];
        for (i = 0; i < unitobject.Length; i++)
        {
            unitimage[i] = unitobject[i].GetComponent <SpriteRenderer>().sprite;
        }

        //お客さんをドロップの機構にセットしておく
        UnitSort();
        Init_SetUnit();
    }
Beispiel #6
0
    void Start()
    {
        //待ち席の画像を初期化
        int i = 0;

        foreach (Image icon in iconImage)
        {
            nowSprite[i] = null;
            icon.sprite  = nowSprite[i];
            i++;
        }

        //効果音の初期化
        audiosource         = GetComponent <AudioSource>();
        volume              = PlayerPrefs.GetFloat("SE", 1.0f);
        audiosource.volume *= volume;

        //お客さんの候補をセットする
        unitdatabase = GameObject.Find("UnitDataBase").GetComponent <UnitDataBase>();
        unitmanager  = GetComponent <UnitManager>();
        SetUnit();
    }