コード例 #1
0
        static public void CloseEffectLooped(int effid)
        {
            Transform t = null;

            effectMap.TryGetValue(effid, out t);
            if (t != null)
            {
                BResources.Destroy(t);
                effectMap.Remove(effid);
            }
        }
コード例 #2
0
    /// <summary>
    /// 销毁窗口
    /// </summary>
    virtual public void Destroy()
    {
        //卸载
        BResources.Destroy(this.Transform);
        //
        foreach (var subwin in this.subWindowsDictionary.Values)
        {
            subwin.Destroy();
        }

        IsLoad = false;
        //卸载窗口
        BResources.UnloadAsset(resourcePath);
    }
コード例 #3
0
        public void Do(IBattle battle, IHeroFSM selfFSM, IHeroFSM targetFSM)
        {
            var o = BResources.Load <GameObject>(this.se.StrParam0);

            effect = GameObject.Instantiate(o).transform;
            //在敌方阵营的特效 需要旋转


            //父节点
            Transform parent = null;

            if (se.DoubleParams0 == 1) //单体
            {
                if (targetFSM.Camp == 2)
                {
                    effect.eulerAngles = new Vector3(0, 180, 0);
                }
                parent = battle.World.GetPlayerRootTransform(targetFSM.ID);
            }
            else if (se.DoubleParams0 == 2)
            {
                parent = battle.World.GetPlayerRootTransform(targetFSM.Camp);
            }
            else if (se.DoubleParams0 == 3) //连接
            {
                parent = battle.World.GetPlayerRootTransform(selfFSM.Camp);
                var mypos  = battle.World.GetPlayerPos(selfFSM.ID);
                var tarpos = battle.World.GetPlayerPos(targetFSM.ID);

                //TODO 求两个向量夹角
                var v1  = new Vector2(mypos.x, mypos.z);
                var v2  = new Vector2(tarpos.x, tarpos.z);
                var dir = (v2 - v1).normalized;

                effect.LookAt(dir);
//              float angle = Vector3.Angle(mypos, tarpos);
//                effect.eulerAngles += new Vector3(0,angle,0);
            }

            effect.SetParent(parent, false);


            if (se.DoubleParams1 > 0)
            {
                IEnumeratorTool.WaitingForExec((float)se.DoubleParams1, () =>
                {
                    BResources.Destroy(effect);
                });
            }
        }
コード例 #4
0
        static StackObject *Destroy_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Transform @trans = (UnityEngine.Transform) typeof(UnityEngine.Transform).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            BResources.Destroy(@trans);

            return(__ret);
        }
コード例 #5
0
 /// <summary>
 /// 删除接口
 /// </summary>
 /// <param name="go"></param>
 static public void Destroy(GameObject go)
 {
     BResources.Destroy(go);
 }