internal void ActivateBlueprint(BlueprintControlSystem blueprintControlSystem) { if (blueprintModules[0].entityCore == null) { foreach (Module m in blueprintModules) { m.entityCore = entityCore; } } entityCore.player.active_currentNanites -= naniteCost; if (blueprintType == BlueprintType.Action) { StartCoroutine(CastingDelay(blueprintControlSystem)); } else if (blueprintType == BlueprintType.Sentry) { PlaceSentry(); } else if (blueprintType == BlueprintType.Proxy) { PlaceProxy(); } }
private IEnumerator CastingDelay(BlueprintControlSystem blueprintControlSystem) { //entityCore.thisAnimator.SetTrigger("cast"); yield return(new WaitForSeconds(castingDelay)); ActivateModules(entityCore.transform, blueprintControlSystem.outPoints, entityCore.activeTarget); isCasting = false; yield break; }
void Start() { #region UNIVERSAL START CALLS thisEntity = this.transform; //Set our entity here. if (hasRigidbody == true) { thisRigidbody = thisEntity.GetComponent <Rigidbody>(); } entityInfo = this.gameObject.GetComponent <EntitySystem_Info>(); blueprintControlSystem = this.gameObject.GetComponent <BlueprintControlSystem>(); SetupStats(); entityRenderers = visibleBody.GetComponentsInChildren <SkinnedMeshRenderer>(); #endregion #region CONDITIONAL START CALLS LinkToEntityCore(); #endregion }