public override bool performPreparations(GoIBase pGOI) { GOI = pGOI; GOI.supportLevel -= 2; GeoscapeVariables.TEM.AddEvent(new TimedEvent(new System.TimeSpan(24, 0, 0),new AIActionCallback(this))); return true; }
public InterceptAction(int index, GridLocation location, GoIBase GOI) { destination = location; eventIndex = index; interceptGroup = GOI; Debug.Log("GOI passed in: " + GOI.name); allowsMultiple = true; startingPoint = null; }
public override bool performPreparations (GoIBase pGOI) { GOI = pGOI; GridLocation location = GeoscapeVariables.WM.GenerateGridLocation(regionName); location.statusCode = 2; newBaseID = GOI.SpawnHQ(location); GOI.supportLevel -= 2; GeoscapeVariables.TEM.AddEvent(new TimedEvent(new System.TimeSpan(12, 0, 0),new AIActionCallback(this))); return true; }
public override bool performPreparations(GoIBase pGOI) { GOI = pGOI; //interceptionVehicle.transform.FindChild("Canvas/Clock").GetComponent<TextMeshProUGUI>().fontMaterial.SetFloat("_ZTestMode", 4); float timeDuration = GameUtils.CalculateDistance(startingPoint.spawnLocation, destination.spawnLocation); GeoscapeVariables.TEM.AddEvent(new TravelTimedEvent( new AITransportDispatchedCallback(GOI, this), new ShotDownAction(), eventIndex, startingPoint.spawnLocation, destination.spawnLocation, "seahawkTransport", Vector3.one * 6, GOI.color, 310f, GOI.name, false)); return true; //_Manager }
public virtual void RepaintIcons(GoIBase GOI) { if(GOI.GetType() != typeof(EventGeneratingGoI)) { foreach(GOIHQBase hq in headQuarters.Values) { if(hq.Location.statusCode == 2) { hq.Icon.GetComponent<Renderer>().material.SetColor("_Color", color); hq.Icon.transform.FindChild("Quad").GetComponent<Renderer>().material.SetColor("_Color",color); } } } }
/** * Run the action. * Returns True if the action performed successfully or false * if something happened and it can no longer perform. In this case * the action queue should clear out and the goal cannot be reached. */ public abstract bool performPreparations(GoIBase pGOI);
public virtual void Load(JSONNode N, GoIBase GOIReference) { requiresWait = N["requiresWait"].AsBool; allowsMultiple = N["allowsMultiple"].AsBool; cost = N["cost"].AsFloat; actionDuration = N["actionDuration"].AsFloat; foreach (JSONNode effect in N["effects"].AsArray) { KeyValuePair<string, object> effectPair = new KeyValuePair<string, object>(effect["key"], effect["object"].AsObject); effects.Add(effectPair); } }
public override void Load(JSONNode N, GoIBase GOIReference) { base.Load(N, GOIReference); regionName = N["regionName"]; newBaseID = N["newBaseID"].AsInt; }