Exemple #1
0
        private void DrawHostilesMenu()
        {
            if (reaper == null)
            {
                if (GUILayout.Button("Spawn Reaper"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.ReaperLeviathan, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.ReaperLeviathan);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    reaper = gameObject.GetComponentInChildren <ReaperLeviathan>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Reaper Components"))
                {
                    foreach (Component c in reaper.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Reaper"))
                {
                    Destroy(reaper.gameObject);
                }

                if (GUILayout.Button("AttackCyclops information"))
                {
                    AttackCyclops ac = reaper.GetComponent <AttackCyclops>();
                    Log.Print("LastTarget: " + ac.lastTarget);
                    Log.Print("aggressPerSecond: " + ac.aggressPerSecond);
                    Log.Print("attackAggressionThreshold: " + ac.attackAggressionThreshold);
                    Log.Print("attackPause: " + ac.attackPause);
                    Log.Print("maxDistToLeash: " + ac.maxDistToLeash);
                    Log.Print("swimVelocity: " + ac.swimVelocity);
                    Log.Print("swimInterval: " + ac.swimInterval);
                    Log.Print("aggressiveToNoise Falloff: " + ac.aggressiveToNoise.Falloff);
                    Log.Print("aggressiveToNoise Value: " + ac.aggressiveToNoise.Value);
                }

                GUILayout.Space(10);
            }

            if (crabsquid == null)
            {
                if (GUILayout.Button("Spawn Crabsquid"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.CrabSquid, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.CrabSquid);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    crabsquid = gameObject.GetComponentInChildren <CrabSquid>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Crabsquid Components"))
                {
                    foreach (Component c in crabsquid.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Crabsquid"))
                {
                    Destroy(crabsquid.gameObject);
                }

                GUILayout.Space(10);
            }

            if (ghostlevi == null)
            {
                if (GUILayout.Button("Spawn Ghost Levi"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.GhostLeviathan, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.GhostLeviathan);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    ghostlevi = gameObject.GetComponentInChildren <GhostLeviathan>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Ghost Levi Components"))
                {
                    foreach (Component c in ghostlevi.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Ghost Levi"))
                {
                    Destroy(ghostlevi.gameObject);
                }

                GUILayout.Space(10);
            }

            if (seaDragon == null)
            {
                if (GUILayout.Button("Spawn Seadragon"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.SeaDragon, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.SeaDragon);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    seaDragon = gameObject.GetComponentInChildren <SeaDragon>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Seadragon Components"))
                {
                    foreach (Component c in seaDragon.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Seadragon"))
                {
                    Destroy(seaDragon.gameObject);
                }

                GUILayout.Space(10);
            }

            if (warper == null)
            {
                if (GUILayout.Button("Spawn warper"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.Warper, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.Warper);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    warper = gameObject.GetComponentInChildren <Warper>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Warper Components"))
                {
                    foreach (Component c in warper.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Warper"))
                {
                    Destroy(warper.gameObject);
                }

                GUILayout.Space(10);
            }
        }
Exemple #2
0
        private void DrawHostilesMenu()
        {
            if (reaper == null)
            {
                if (GUILayout.Button("Spawn Reaper"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.ReaperLeviathan, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.ReaperLeviathan);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    reaper = gameObject.GetComponentInChildren <ReaperLeviathan>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Reaper Components"))
                {
                    foreach (Component c in reaper.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Reaper"))
                {
                    Destroy(reaper.gameObject);
                }

                GUILayout.Space(10);
            }

            if (crabsquid == null)
            {
                if (GUILayout.Button("Spawn Crabsquid"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.CrabSquid, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.CrabSquid);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    crabsquid = gameObject.GetComponentInChildren <CrabSquid>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Crabsquid Components"))
                {
                    foreach (Component c in crabsquid.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Crabsquid"))
                {
                    Destroy(crabsquid.gameObject);
                }

                GUILayout.Space(10);
            }

            if (ghostlevi == null)
            {
                if (GUILayout.Button("Spawn Ghost Levi"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.GhostLeviathan, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.GhostLeviathan);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    ghostlevi = gameObject.GetComponentInChildren <GhostLeviathan>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Ghost Levi Components"))
                {
                    foreach (Component c in ghostlevi.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Ghost Levi"))
                {
                    Destroy(ghostlevi.gameObject);
                }

                GUILayout.Space(10);
            }

            if (seaDragon == null)
            {
                if (GUILayout.Button("Spawn Seadragon"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.SeaDragon, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.SeaDragon);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    seaDragon = gameObject.GetComponentInChildren <SeaDragon>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Seadragon Components"))
                {
                    foreach (Component c in seaDragon.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Seadragon"))
                {
                    Destroy(seaDragon.gameObject);
                }

                GUILayout.Space(10);
            }

            if (warper == null)
            {
                if (GUILayout.Button("Spawn warper"))
                {
                    GameObject prefabForTechType = CraftData.GetPrefabForTechType(TechType.Warper, true);
                    GameObject gameObject        = Utils.CreatePrefab(prefabForTechType);
                    LargeWorldEntity.Register(gameObject);
                    CrafterLogic.NotifyCraftEnd(gameObject, TechType.Warper);
                    gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver);
                    warper = gameObject.GetComponentInChildren <Warper>();
                    gameObject.transform.position += 50f * gameObject.transform.forward;
                }
            }
            else
            {
                GUILayout.Space(10);

                if (GUILayout.Button("Warper Components"))
                {
                    foreach (Component c in warper.GetComponentsInChildren(typeof(Component)))
                    {
                        Log.Print("Component: " + c + " on go: " + c.gameObject.name);
                    }
                }

                if (GUILayout.Button("Delete Warper"))
                {
                    Destroy(warper.gameObject);
                }

                GUILayout.Space(10);
            }
        }