//~ private static List<int> towerIDList=new List<int>(); // Add menu named "PerkEditor" to the Window menu //[MenuItem ("TDTK/PerkEditor")] public static void Init () { // Get existing open window or if none, make a new one: window = (PerkEditorWindow)EditorWindow.GetWindow(typeof (PerkEditorWindow)); window.minSize=new Vector2(615, 700); window.maxSize=new Vector2(615, 701); InitLabel(); allPerkList=new List<Perk>(); rscList=ResourceEditorWindow.Load(); LoadTower(); LoadAbility(); Load(); //~ RefreshIDList(); int i=0; foreach(Perk perk in allPerkList){ //~ perk.SetType(perk.type); //~ perk.value=new float[perk.valueCount]; perk.ID=i; i+=1; } NewSelection(0); }
public static void Init() { // Get existing open window or if none, make a new one: window = (AbilityEditorWindow)EditorWindow.GetWindow(typeof(AbilityEditorWindow)); window.minSize = new Vector2(615, 750); window.maxSize = new Vector2(615, 751); InitLabel(); allAbilityList = new List <Ability>(); rscList = ResourceEditorWindow.Load(); Load(); //int i=0; //foreach(Ability ability in allAbilityList){ //ability.ID=i; //i+=1; //Debug.Log(ability.ID); //} selectedAbilID = 0; }
// Add menu named "TowerEditor" to the Window menu //[MenuItem ("TDTK/TowerEditor")] public static void Init() { // Get existing open window or if none, make a new one: window = (CreepEditor)EditorWindow.GetWindow(typeof(CreepEditor)); window.minSize = new Vector2(720, 650); rscList = ResourceEditorWindow.Load(); GetCreep(); InitCreepAttackLabel(); }
public void VerifyingList() { list = ResourceEditorWindow.Load(); Resource[] tempList = new Resource[list.Count]; for (int i = 0; i < tempList.Length; i++) { tempList[i] = list[i]; for (int j = 0; j < rm.resources.Length; j++) { if (tempList[i].CheckMatch(rm.resources[j])) { tempList[i].value = rm.resources[j].value; } } } rm.resources = tempList; }
// Add menu named "TowerEditor" to the Window menu //[MenuItem ("TDTK/SpawnEditor")] public static void Init() { // Get existing open window or if none, make a new one: window = (SpawnEditor)EditorWindow.GetWindow(typeof(SpawnEditor)); window.minSize = new Vector2(670, 620); int enumLength = Enum.GetValues(typeof(_SpawnLimit)).Length; spawnLimitLabel = new string[enumLength]; spawnLimitLabel[0] = "Finite"; spawnLimitLabel[1] = "Infinite"; spawnLimitTooltip = new string[enumLength]; spawnLimitTooltip[0] = "Finite number of waves"; spawnLimitTooltip[1] = "Infinite number of waves (for survival or endless mode)"; enumLength = Enum.GetValues(typeof(_SpawnMode)).Length; spawnTypeLabel = new string[enumLength]; spawnTypeLabel[0] = "Continuous"; spawnTypeLabel[1] = "WaveCleared"; spawnTypeLabel[2] = "RoundBased"; spawnTypeLabel[3] = "SkippableContinuous"; spawnTypeLabel[4] = "SkippableWaveCleared"; spawnTypeTooltip = new string[enumLength]; spawnTypeTooltip[0] = "A new wave is spawn upon every wave duration countdown"; spawnTypeTooltip[1] = "A new wave is spawned when the current wave is cleared"; spawnTypeTooltip[2] = "Similar to Continuous but user can initiate the new next wave before the timer runs out"; spawnTypeTooltip[3] = "Similar to WaveCleared but user can initiate the next wave before clearing current wave"; spawnTypeTooltip[4] = "Each wave is treated like a round. a new wave can only take place when the previous wave is cleared. Each round require initiation from user"; LoadCreep(); GetSpawnManager(); rscList = ResourceEditorWindow.Load(); }
void UpdateResourceList(){ rscList=ResourceEditorWindow.Load(); Repaint(); }