Exemple #1
0
    /// <summary>
    /// ツボの属性を変更する処理
    /// </summary>
    public void ChangePotType(PotStatus.PotType pot_type)
    {
        switch (pot_type)
        {
        case PotStatus.PotType.Normal:
            gameObject.GetComponent <Anima2D.SpriteMeshAnimation>().frame = 0;
            break;

        case PotStatus.PotType.Fire:
            gameObject.GetComponent <Anima2D.SpriteMeshAnimation>().frame = 1;
            break;

        case PotStatus.PotType.Ice:
            gameObject.GetComponent <Anima2D.SpriteMeshAnimation>().frame = 2;
            break;

        case PotStatus.PotType.Thunder:
            gameObject.GetComponent <Anima2D.SpriteMeshAnimation>().frame = 3;
            break;

        case PotStatus.PotType.Dark:
            gameObject.GetComponent <Anima2D.SpriteMeshAnimation>().frame = 4;
            break;
        }
    }
Exemple #2
0
    /// <summary>
    /// マップの属性によってツボの属性を変える処理
    /// </summary>
    private void AttributePot(MapInfo.Attribute attri)
    {
        switch (attri)
        {
        case MapInfo.Attribute.NORMAL:
            pot_type = PotStatus.PotType.Normal;
            break;

        case MapInfo.Attribute.ICE:
            pot_type = PotStatus.PotType.Ice;
            break;

        case MapInfo.Attribute.THUNDER:
            pot_type = PotStatus.PotType.Thunder;
            break;

        default:
            break;
        }
        pot_ctr.ChangePotType(pot_type);
    }