Exemple #1
0
 public static void Print(this Dictionary <object, object> dict, E_ColorType ecolor = E_ColorType.Init)
 {
     Darkfeast.Log("Print-dictCount " + dict.Count, E_ColorType.UI);
     foreach (var v in dict)
     {
         Darkfeast.Log("k " + v.Key + "  v " + v.Value, ecolor);
     }
     Darkfeast.Log("---------------------" + dict.Count, E_ColorType.Over);
 }
    public static void SetPos(string key, Vector3 pos)
    {
        string x = Darkfeast.Float2String(pos.x, 2);
        string y = Darkfeast.Float2String(pos.y, 2);
        string z = Darkfeast.Float2String(pos.z, 2);
        string p = x + "|" + y + "|" + z;

        PlayerPrefs.SetString(key, p);
    }
Exemple #3
0
 //打印列表内容
 public static void Print <T>(this List <T> list, E_ColorType ecolor = E_ColorType.Init)
 {
     Darkfeast.Log("Print-listCount " + list.Count, E_ColorType.UI);
     foreach (var v in list)
     {
         Darkfeast.Log(v, ecolor);
     }
     Darkfeast.Log("---------------------" + list.Count, E_ColorType.Over);
 }
Exemple #4
0
    void Start()
    {
        Darkfeast.Log("start");
        btn_rew = gameObject.AddComponent <Button>();
        btn_rew.onClick.AddListener(Reward);

        MobileAds.Initialize(state =>
        {
            Debug.Log("init reward");
            //reward = new RewardedAd(rewardId);
            InitBanner();
        });

        //MobileAds.Initialize(appid);
    }
Exemple #5
0
    public static T GetComponentType(string tag)
    {
        GameObject go = GameObject.FindWithTag(tag);

        if (go == null)
        {
            Darkfeast.Log("find tag [" + tag + "]type " + typeof(T) + "  gameObject is null", E_ColorType.Err);
        }
        T t = go.GetComponent <T>();

        if (t == null)
        {
            Darkfeast.Log("find tag [" + tag + "]" + "  find  type " + typeof(T) + "  is null", E_ColorType.Err);
        }
        return(t);
    }
Exemple #6
0
 void BannerFailed(object sender, AdFailedToLoadEventArgs arg)
 {
     Darkfeast.Log("banner err " + arg.Message);
 }
Exemple #7
0
 void BannerLoaded(object sender, EventArgs arg)
 {
     Darkfeast.Log("banner loaded");
 }