예제 #1
0
        static void _ConvertBoxCollider2Dto3D(GameObject o)
        {
            o.layer = GK.LayerId("UI");

            var rb = o.GetComponent <Rigidbody>();

            if (rb)
            {
                GK.Destroy(rb);
            }

            var co = o.GetComponent <BoxCollider2D>();

            if (co)
            {
                Vector4 v4 = new Vector4(co.size.x, co.size.y, co.offset.x, co.offset.y);

                GK.Destroy(co);

                o.AddComponent <BoxCollider>();
                o.GetComponent <BoxCollider>().size   = new Vector3(v4.x, v4.y, 1);
                o.GetComponent <BoxCollider>().center = new Vector3(v4.z, v4.w, 1);
            }

            foreach (Transform t in o.transform)
            {
                _ConvertBoxCollider2Dto3D(t.gameObject);
            }
        }
예제 #2
0
 static public void ClosePanel <T>(T panel) where T : MonoBehaviour
 {
     if (panel != null)
     {
         GK.Destroy(panel.gameObject);
     }
 }
예제 #3
0
 public void Save()
 {
     if (sceneObj)
     {
         GKEditor.CreateOrReplacePrefab(path, sceneObj);
         AssetDatabase.SaveAssets();
         GK.Destroy(sceneObj);
         sceneObj = null;
     }
 }
예제 #4
0
파일: 139825.cs 프로젝트: xPathin/DiIiS-
        public override void Execute(Map.World world)
        {
            Logger.Debug(" Death Of King Event Path 2");

            //Берём участников сцены
            var LeoricGhost    = world.GetActorBySNO(5365);
            var GhostKnights   = world.GetActorsBySNO(4182);
            var LachdananGhost = world.GetActorBySNO(4183);
            var SwordPlace     = world.GetActorBySNO(163449);

            TickTimer Timeout = new SecondsTickTimer(world.Game, 23f);
            var       ListenerKingSkeletons = System.Threading.Tasks.Task <bool> .Factory.StartNew(() => WaitToSpawn(Timeout));

            ListenerKingSkeletons.ContinueWith(delegate
            {
                LeoricGhost.Destroy();
                LachdananGhost.Destroy();
                foreach (var GK in GhostKnights)
                {
                    GK.Destroy();
                }
            });
        }