using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
public class NestedBuff
{
ย ย string nestedBuffname;
ย ย bool isUsing;
ย ย public List<string> nestedBuffs;
ย ย // Start is called before the first frame update
ย ย NestedBuff(List<string> nestedBuffname,bool IsUsing)
ย ย {
ย ย ย ย this.nestedBuffs = nestedBuffs.ToList();
ย ย ย ย this.IsUsing = IsUsing;
ย ย }
ย ย public string NestedBuffnameย ย // property
ย ย {
ย ย ย ย get { return nestedBuffname; }
ย ย ย ย set { nestedBuffname = value; }
ย ย }
ย ย public bool IsUsingย ย // property
ย ย {
ย ย ย ย get { return isUsing; }
ย ย ย ย set { isUsing = value; }
ย ย }
}
์ด๋ ๊ฒ ํด๋์ค ์ ์ํ๊ณ
๋ค๋ฅธํ์ผ์์
nestedBuff = new NestedBuff(buffeffectSort,false);
์ผ๋ก ๊ฐ์ฒด์์ฑํ๋๋ฐย
์ด๋ฐ์ค๋ฅ๊ฐ๋ธ
ย error CS0122: 'NestedBuff.NestedBuff(List<string>, bool)' is inaccessible due to its protection level
์์ฑ์ ์์ public์ ๋ถ์ด์
์์ฑ์๊ฐ ํผ๋ธ๋ฆญ์ด ์๋๋ค
C#์ ๊ธฐ๋ณธ ๋ณดํธ ์์ค์ 'private'์ด๋ค.