// Use this for initialization void Start () { EnemyList = GameObject.Find("Overseer").GetComponent<Overseer>(); //int counter = 0; //int size=Int32.Parse(file.ReaTdLine()); //timer=0; //UnityEngine.Debug.Log(line); //while ((line = file.ReadLine()) != null) //{ // string[] row=line.Split(' '); // note=Int32.Parse(row[1]); // time=float.Parse(row[0]); //StartCoroutine(coroutine(time));// start spin lock //Debug.Log(timer); //noteFall clonescript = clone.GetComponent<noteFall>(); //note to change this to Int32.Parse at some time //clonescript.setTimeOffset(float.Parse(row[0])); //clone.GetComponent<noteFall>().timeOffset=float.Parse(row[0]); //clone.GetComponent<noteFall>().setTimeOffset(float.Parse(row[0])); //Debug.Log(float.Parse(row[0])); // } // file.Close(); //reference = GameObject.Find("DeathBox").GetComponent<deathBar>(); }
public void Update(GameTime gt, Architech arch, Overseer os, UiMaster master, Grid grid, Player player) { foreach (KeyValuePair <int, Spell> kv in castedSpells) { kv.Value.Update(gt, arch, os, grid, player); if (kv.Value.State == Spell_States.Dead) { deadSpells.Add(kv.Key); } } foreach (int i in deadSpells) { castedSpells.Remove(i); } deadSpells.Clear(); if (master.NextAction != ButtonFunction.Nan) { switch (master.NextAction) { case ButtonFunction.Ressurect: master.Pop_Action(); selectedSpell = ButtonFunction.Ressurect.ToString(); break; case ButtonFunction.RestoreEssence: master.Pop_Action(); selectedSpell = ButtonFunction.RestoreEssence.ToString(); break; case ButtonFunction.DrainEssence: master.Pop_Action(); selectedSpell = ButtonFunction.DrainEssence.ToString(); break; case ButtonFunction.DeadAgain: master.Pop_Action(); selectedSpell = ButtonFunction.DeadAgain.ToString(); break; case ButtonFunction.ClearDead: master.Pop_Action(); selectedSpell = ButtonFunction.ClearDead.ToString(); break; } } if (master.Highlight != ButtonFunction.Nan) { switch (master.Highlight) { case ButtonFunction.DrainEssence: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(spell_data[SpellType.DrainEssence].ID, spell_data[SpellType.DrainEssence].Info)); RemoveInfo(master, new SpellType[] { SpellType.Ressurect, SpellType.DeadAgain, SpellType.RestoreEssence }); break; case ButtonFunction.Ressurect: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(spell_data[SpellType.Ressurect].ID, spell_data[SpellType.Ressurect].Info)); RemoveInfo(master, new SpellType[] { SpellType.DrainEssence, SpellType.RestoreEssence, SpellType.DeadAgain }); break; case ButtonFunction.RestoreEssence: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(spell_data[SpellType.RestoreEssence].ID, spell_data[SpellType.RestoreEssence].Info)); RemoveInfo(master, new SpellType[] { SpellType.DrainEssence, SpellType.Ressurect, SpellType.DeadAgain }); break; case ButtonFunction.DeadAgain: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(spell_data[SpellType.DeadAgain].ID, spell_data[SpellType.DeadAgain].Info)); RemoveInfo(master, new SpellType[] { SpellType.DrainEssence, SpellType.Ressurect, SpellType.RestoreEssence }); break; case ButtonFunction.ClearDead: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(spell_data[SpellType.ClearDead].ID, spell_data[SpellType.ClearDead].Info)); break; } } if (player.Mode != Player_Modes.Spells) { RemoveInfo(master, new SpellType[] { SpellType.Ressurect, SpellType.DrainEssence, SpellType.DeadAgain, SpellType.RestoreEssence }); } if (player.Cursor.isLeftPressed && grid.IsHighlighted && selectedSpell != "" && (player.Mode == Player_Modes.Spells || (player.Mode == Player_Modes.Tools && selectedSpell == ButtonFunction.ClearDead.ToString())) && player.Cursor.GetState != player.Cursor.prevState) { CastSpell(grid, (SpellType)Enum.Parse(typeof(SpellType), selectedSpell), player, master); } if (player.HasPopChanged) { RefreshData(true, os); } }
public override async Task Enter(Overseer overseer, Friend friend) { await overseer.Speaking.SendFile(friend, _filepath); await friend.Memory.MoveConversationTo(FollowingNode, overseer); }
public void Update(Grid grid, UiMaster master, Overseer os, Player player, GameTime gt, List <Rectangle> units) { buildingPlaced = false; buildingDestroyed = false; foreach (KeyValuePair <Point, Building> kv in buildings) { kv.Value.Update(player, gt, this, grid, units, master); if (kv.Value.State == BuildingStates.Production) { kv.Value.Produce(player, gt, os); } if (kv.Value.GetBuildingData().Health <= 0) { remove_queue.Add(kv.Key); } } foreach (Point id in remove_queue) { Dismantle(grid, GetBuilding(id), player); buildings.Remove(id); } remove_queue.Clear(); if (master.NextAction != ButtonFunction.Nan) { switch (master.NextAction) { case ButtonFunction.Wall: master.Pop_Action(); selectedBuilding = ButtonFunction.Wall.ToString(); break; case ButtonFunction.Grave: master.Pop_Action(); selectedBuilding = ButtonFunction.Grave.ToString(); break; case ButtonFunction.EnergyConduit: master.Pop_Action(); selectedBuilding = ButtonFunction.EnergyConduit.ToString(); break; case ButtonFunction.NecroticOrrery: master.Pop_Action(); selectedBuilding = ButtonFunction.NecroticOrrery.ToString(); break; case ButtonFunction.Demolish: master.Pop_Action(); selectedBuilding = ButtonFunction.Demolish.ToString(); break; } } if (master.Highlight != ButtonFunction.Nan) { switch (master.Highlight) { case ButtonFunction.EnergyConduit: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(building_data[BuildingTypes.EnergyConduit].Id, building_data[BuildingTypes.EnergyConduit].Info)); RemoveInfo(master, new BuildingTypes[] { BuildingTypes.Grave, BuildingTypes.Wall, BuildingTypes.NecroticOrrery }); break; case ButtonFunction.NecroticOrrery: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(building_data[BuildingTypes.NecroticOrrery].Id, building_data[BuildingTypes.NecroticOrrery].Info)); RemoveInfo(master, new BuildingTypes[] { BuildingTypes.Grave, BuildingTypes.Wall, BuildingTypes.EnergyConduit }); break; case ButtonFunction.Wall: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(building_data[BuildingTypes.Wall].Id, building_data[BuildingTypes.Wall].Info)); RemoveInfo(master, new BuildingTypes[] { BuildingTypes.Grave, BuildingTypes.NecroticOrrery, BuildingTypes.EnergyConduit }); break; case ButtonFunction.Grave: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(building_data[BuildingTypes.Grave].Id, building_data[BuildingTypes.Grave].Info)); RemoveInfo(master, new BuildingTypes[] { BuildingTypes.Wall, BuildingTypes.NecroticOrrery, BuildingTypes.EnergyConduit }); break; case ButtonFunction.Demolish: master.RecieveInfo(new KeyValuePair <Guid, InfoPanel>(building_data[BuildingTypes.Demolish].Id, building_data[BuildingTypes.Demolish].Info)); break; } } if (player.Mode != Player_Modes.Building) { RemoveInfo(master, new BuildingTypes[] { BuildingTypes.Wall, BuildingTypes.NTower, BuildingTypes.Grave, BuildingTypes.EnergyConduit }); } if (player.Cursor.isLeftPressed && player.Cursor.GetState != player.Cursor.prevState && grid.IsHighlighted && selectedBuilding != "" && player.Mode == Player_Modes.Building) { PlaceBuilding(grid, (BuildingTypes)Enum.Parse(typeof(BuildingTypes), selectedBuilding)); } else if (player.Cursor.isLeftPressed && player.Cursor.GetState != player.Cursor.prevState && grid.IsHighlighted && (player.Mode == Player_Modes.Tools && selectedBuilding == ButtonFunction.Demolish.ToString())) { Dismantle(grid, player); } }
void DebugMenu.IDocumentServant.SetupDebugDocument() { SetupDebugDocument(Overseer.Get <DebugMenuDocument>()); }
protected TemporaryProcessorCode(Overseer overseer) : base(overseer) { }
void Start() { overseer = FindObjectOfType<Overseer>(); }
public ConversationProcessorCode(Overseer overseer) : base(overseer) { }
// Use this for initialization void Start() { st = GameObject.Find("ScoreBoard").GetComponent <ScoresText>(); EnemyList = GameObject.Find("Overseer").GetComponent <Overseer>(); }
public CommandsProcessorCode(Overseer overseer) : base(overseer) { }
public override async Task Enter(Overseer overseer, Friend friend) { await this.whatDo(friend); await friend.Memory.MoveConversationTo(this.FollowingNode, overseer); }
public TelegramEndpoint(Overseer overseer) { this.overseer = overseer; }
public override Task Enter(Overseer overseer, Friend friend) { _action(overseer, friend); return(Task.FromResult(0)); }
public override void Realize() { if (realizedCreature != null) { return; } switch (creatureTemplate.TopAncestor().type) { case CreatureTemplate.Type.Slugcat: realizedCreature = new Player(this, world); break; case CreatureTemplate.Type.LizardTemplate: realizedCreature = new Lizard(this, world); break; case CreatureTemplate.Type.Fly: realizedCreature = new Fly(this, world); break; case CreatureTemplate.Type.Leech: realizedCreature = new Leech(this, world); break; case CreatureTemplate.Type.Snail: realizedCreature = new Snail(this, world); break; case CreatureTemplate.Type.Vulture: realizedCreature = new Vulture(this, world); break; case CreatureTemplate.Type.GarbageWorm: GarbageWormAI.MoveAbstractCreatureToGarbage(this, Room); realizedCreature = new GarbageWorm(this, world); break; case CreatureTemplate.Type.LanternMouse: realizedCreature = new LanternMouse(this, world); break; case CreatureTemplate.Type.CicadaA: realizedCreature = new Cicada(this, world, creatureTemplate.type == CreatureTemplate.Type.CicadaA); break; case CreatureTemplate.Type.Spider: realizedCreature = new Spider(this, world); break; case CreatureTemplate.Type.JetFish: realizedCreature = new JetFish(this, world); break; case (CreatureTemplate.Type)patch_CreatureTemplate.Type.SeaDrake: realizedCreature = new SeaDrake(this, world); break; case CreatureTemplate.Type.BigEel: realizedCreature = new BigEel(this, world); break; case CreatureTemplate.Type.Deer: realizedCreature = new Deer(this, world); break; case (CreatureTemplate.Type)patch_CreatureTemplate.Type.WalkerBeast: realizedCreature = new WalkerBeast(this, world); break; case CreatureTemplate.Type.TubeWorm: realizedCreature = new TubeWorm(this, world); break; case CreatureTemplate.Type.DaddyLongLegs: realizedCreature = new DaddyLongLegs(this, world); break; case CreatureTemplate.Type.TentaclePlant: if (creatureTemplate.type == CreatureTemplate.Type.TentaclePlant) { realizedCreature = new TentaclePlant(this, world); } else { realizedCreature = new PoleMimic(this, world); } break; case CreatureTemplate.Type.MirosBird: realizedCreature = new MirosBird(this, world); break; case CreatureTemplate.Type.TempleGuard: realizedCreature = new TempleGuard(this, world); break; case CreatureTemplate.Type.Centipede: case CreatureTemplate.Type.RedCentipede: case CreatureTemplate.Type.Centiwing: case CreatureTemplate.Type.SmallCentipede: realizedCreature = new Centipede(this, world); break; case CreatureTemplate.Type.Scavenger: realizedCreature = new Scavenger(this, world); break; case CreatureTemplate.Type.Overseer: realizedCreature = new Overseer(this, world); break; case CreatureTemplate.Type.VultureGrub: if (creatureTemplate.type == CreatureTemplate.Type.VultureGrub) { realizedCreature = new VultureGrub(this, world); } else if (creatureTemplate.type == CreatureTemplate.Type.Hazer) { realizedCreature = new Hazer(this, world); } break; case CreatureTemplate.Type.EggBug: realizedCreature = new EggBug(this, world); break; case CreatureTemplate.Type.BigSpider: case CreatureTemplate.Type.SpitterSpider: realizedCreature = new BigSpider(this, world); break; case CreatureTemplate.Type.BigNeedleWorm: if (creatureTemplate.type == CreatureTemplate.Type.SmallNeedleWorm) { realizedCreature = new SmallNeedleWorm(this, world); } else { realizedCreature = new BigNeedleWorm(this, world); } break; case CreatureTemplate.Type.DropBug: realizedCreature = new DropBug(this, world); break; } InitiateAI(); for (int i = 0; i < stuckObjects.Count; i++) { if (stuckObjects[i].A.realizedObject == null) { stuckObjects[i].A.Realize(); } if (stuckObjects[i].B.realizedObject == null) { stuckObjects[i].B.Realize(); } } }
// Use this for initialization void Start () { EnemyList = GameObject.Find("Overseer").GetComponent<Overseer>(); }
public ProjectileController() { Overseer.RegisterProjectile(this); }
public MergeGuidProcessorCode(Overseer overseer) : base(overseer) { }
private void Awake() { instance = this; }
public BallObject(Player left, Player right, Overseer overseer) { this.left = left; this.right = right; this.overseer = overseer; }
public static void Init() { Overseer = new Overseer(); }
// Use this for initialization void Start() { text = GetComponent<Text>(); overseer = FindObjectOfType<Overseer>(); }
// Use this for initialization void Awake() { variationscript = UnitTest.GetComponent<DynamicVariation>(); debugging = false; overseer = Overseer.Instance; overseer.coins = 15; overseer.points = 0; overseer.citizen = 5; overseer.capacity = 5; overseer.environmentPoints = 0; overseer.day = startDay; GameObject[] transitionProjects = GameObject.FindGameObjectsWithTag("Project"); foreach (GameObject p in transitionProjects) { Project script = p.GetComponent<Project>(); projects.Add(script); } }