コード例 #1
0
    public static void Buff2(Vector2 position, int level)
    {
        BuffInGround prefab = Resources.Load <BuffInGround>(PathRewardBuff);
        Buff2Data    b      = DataMap.GetBuff2(level);

        if (prefab == null || b == null)
        {
            Debug.Log("Khong tin tai Prefab hoac Buff");
            return;
        }
        BuffInGround buff = Instantiate(prefab);

        buff.transform.position = position;
        buff.SetUp(b);
    }