Example #1
0
        public static FMySprite CreateMySprite(this GameObject go, GameObject parent = null)
        {
            GameObject newGameObject = new GameObject();

            newGameObject.name  = "FMySprite_" + go.name;
            newGameObject.layer = go.layer;
            if (parent == null)
            {
                parent = go.transform.parent.gameObject;
            }
            newGameObject.transform.parent     = parent.transform;
            newGameObject.transform.position   = go.transform.position;
            newGameObject.transform.rotation   = go.transform.rotation;
            newGameObject.transform.localScale = go.transform.localScale;
            FMySprite fs = SceneManager.instance.AddComponent <FMySprite>(newGameObject);

            fs.SetHostGameObject(go);
            return(fs);
        }
Example #2
0
 public override void Begin(params object[] obj)
 {
     nLogButtone[0].nBtEvent = ClickD;
     nLog.SetActive(true);
     for (int j = 0; j < nBackTexs.Length; j++)
     {
         nBackTexs[j].gameObject.SetActive(false);
         FMySprite fms = null;
         fms = nBackTexs[j].gameObject.CreateMySprite();
         int higNum = 100;
         if (j == 1)
         {
             higNum = 60;
         }
         else if (j == 2)
         {
             higNum = 110;
         }
         fms.CreateClip(50, higNum);
         mFmys.Add(fms);
     }
     StartCoroutine(PlayFun());
 }
Example #3
0
 public void  Init(FMySprite fms)
 {
     mFms = fms;
     Begin();
 }