public void FixedUpdate() { if (UnitsToDeploy.Count > 0) { timer += Time.fixedDeltaTime; if (GetOwner.HasResearch(3)) { timer += Time.fixedDeltaTime * .15f; } if (timer > UnitsToDeploy.Peek().GetTimeToDeploy) { ActuallyDeploy(UnitsToDeploy.Dequeue(), this.GetOwner); var t = unit.GetAlliesAtPosition(WhereToGo.transform.position, 5, GetOwner); if (t.Length > 0) { GameManager.Formation(WhereToGo.transform.position, Vector3.zero, t, .1f); } timer = 0; } } else { timer = 0; } }
protected virtual void GatherRessource() { //Ressource are currently finite, we should find a way to replenish 'em if (Primary.getAmount > 0) { GetOwner.Gain(Primary, Yield, transform.position); } }
public override void OpenContextMenu() { CanCreateCustomizable = GetOwner.HasResearch(18); base.OpenContextMenu(); tbox.gameObject.SetActive(true); tbox.Header.text = "Garisson at" + transform.position.ToString(); tbox.Texts[1].text = description; CustomizeButton.gameObject.SetActive(CanCreateCustomizable); OpenCustomization(false); SetButtons(); }
private void FixedUpdate() { timer += Time.fixedDeltaTime; if (GetOwner.HasResearch(6)) { timer += Time.fixedDeltaTime * .25f; } //Different ressourc, different timing OR we can use one fix timer if (timer > (Primary.hardness / GatheringSpeed) && HasResource) { GatherRessource(); timer = 0; } }
public virtual void SetButtons() { foreach (var item in buttons) { item?.SetActive(true); } if (!GetOwner.HasResearch(5)) { buttons[1].gameObject.SetActive(false); } if (!GetOwner.HasResearch(8)) { buttons[3].gameObject.SetActive(false); } if (!GetOwner.HasResearch(17)) { buttons[9].gameObject.SetActive(false); } }
public JsonResult GetOwnerInfo(GetOwner getOwner) { var result = getOwner.ExecuteItem(); return(this.Json(new { result = new { Id = result.Id, FullName = result.FullName } }, JsonRequestBehavior.AllowGet)); }
public ActionResult Profile(GetOwner getOwner) { Owner owner = getOwner.ExecuteItem(); return(View(owner)); }
public override void TakeDamage(float t, entity e, DamageType p = DamageType.Null) { base.TakeDamage(t, e, p); GetOwner.modRelation(e.GetOwner, -100); }
protected virtual void Start() { AddToStateContoller(GetOwner.GetComponent <AIView>()); }