Ejemplo n.º 1
0
    public GameObject etoObject; //Prefabの設定

    public void SetUpEtoObject(int etoTypeNum)
    {
        //干支の種類を選択
        this.etoType = (EtoType)etoTypeNum;
        etoObject    = Resources.Load <GameObject>("EtoObject/" + etoTypeNum);

        if (this.etoType == EtoType.猫)
        {
            isMyInfo = true;
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 干支の初期設定
    /// </summary>
    public void SetUpEto(EtoType etoType, Sprite sprite)
    {
        // 干支の種類を設定
        this.etoType = etoType;

        // 干支の名前を、設定した干支の種類の名前に変更
        name = this.etoType.ToString();;

        // 引数で届いた干支のイメージに合わせてメージを変更
        ChangeEtoImage(sprite);
    }
Ejemplo n.º 3
0
    public void SetUpEtoInfo(EtoType etoType, int rank, int score)
    {
        this.etoType = etoType;

        this.rank = rank;

        this.score = score;

        if (this.etoType != EtoType.猫)
        {
            // 干支の画像の設定(画像を Resources フォルダより読み込む。別の方法でも可)
            etoImage.sprite = Resources.Load <Sprite>("EtoIcon/" + (int)etoType);
        }
        else
        {
            // 干支の画像の設定(画像を Resources フォルダより読み込む。別の方法でも可)
            etoImage.sprite = Resources.Load <Sprite>("EtoIcon/" + ((int)etoType + 1));
        }

        DisplayPoint();
    }
Ejemplo n.º 4
0
    /// <summary>
    /// 干支情報の設定
    /// </summary>
    /// <param name="etoTypeNum"></param>
    /// <param name="point"></param>
    public void SetUpEtoInfo(int etoTypeNum, int point)
    {
        //干支の種類を設定
        this.etoType = (EtoType)etoTypeNum;

        //ポイントの設定
        this.point = point;



        //干支の画像の設定(画像をResourceフォルダより読み込む。別の方法でも可)
        etoImage.sprite = Resources.Load <Sprite>("EtoIcon/" + etoTypeNum);

        //干支の種類が猫の場合
        if (this.etoType == EtoType.猫)
        {
            this.point = 0;
            isMyInfo   = true;
        }

        //ポイントの表示
        DisplayPoint();
    }
Ejemplo n.º 5
0
 //コンストラクタ(インスタンス(new)時に用意している因数への値の代入を強制するメソッド)
 public EtoData(EtoType etoType, Sprite sprite)
 {
     this.etoType = etoType;
     this.sprite  = sprite;
 }