public virtual void Load() { abilityData = AbilityDataCache.GetDataForAbility(name); //Debug.Log("Ability Base is loading ability with cooldown" + abilityData.stats.cooldown); cooldown = abilityData.stats.cooldown; }
void Start() { // Projectile will have "(Clone)" added to the name as it was instatiated after a template GO string correctName = name.Replace("(Clone)", ""); speed = AbilityDataCache.GetProjectileSpeed(correctName); }
private void Awake() { abilityData = AbilityDataCache.GetDataForAbility(name); speedBoost = abilityData.stats.dotValue; //gameObject.SetActive(false); }
//Vector3 direction; //float angle; //int angleCorrection = 90; // Use this for initialization void Start() { base.Load(); // Cache transform to later check for cast range playerTransform = LocalPlayerReferences.playerTransform; string layerName = LayerMask.LayerToName(LocalPlayerReferences.playerGameObject.layer); layerName = layerName.Replace("Player", "Ability"); projectileName = spawnedObject.name.Replace("(Clone)", ""); // Load castRange based on projectile name string abilityBaseName = projectileName.Replace("Projectile", ""); Debug.Log("SpawnAbility Start name for cast range config is " + abilityBaseName); castRange = AbilityDataCache.GetAbilityCastRange(abilityBaseName); // If it's an ice wall or a mana sphere leave the layer to be the default one so that all players can interact with it if (name.Contains("IceWall") || name.Contains("Mana")) { return; } if (isBuffForTeam) { layerName = Utils.Instance.SwitchPlayerLayerName(layerName); } projectileLayer = LayerMask.NameToLayer(layerName); }
private void Start() { playerTransform = LocalPlayerReferences.playerTransform; teleportation = LocalPlayerReferences.player.teleportation; // Load cast range from config castRange = AbilityDataCache.GetAbilityCastRange("Blink"); }
// Start is called before the first frame update void Start() { spriteRenderer = GetComponent <SpriteRenderer>(); color = spriteRenderer.color; objectVisibleTime = AbilityDataCache.GetDataForAbility(name).stats.duration; setSpriteAlpha(initialAlpha); }
// Start is called before the first frame update void Start() { outOfRangeSprite = AbilityDataCache.GetSpellIndicatorOutOfRangeSprite(); outOfRangeIndicator = new GameObject("OutOfRangeIndicator"); outOfRangeIndicator.transform.parent = transform; outOfRangeIndicator.transform.localScale = new Vector3(0.75f, 0.75f, 1); SpriteRenderer spRenderer = outOfRangeIndicator.AddComponent <SpriteRenderer>(); spRenderer.sprite = outOfRangeSprite; outOfRangeIndicator.SetActive(false); }
void OnEnable() { // Projectile will have "(Clone)" added to the name as it was instatiated after a template GO string correctName = name.Replace("(Clone)", ""); speed = AbilityDataCache.GetProjectileSpeed(correctName); Debug.Log("MoveAbilityToPoint speed for " + name + " is " + speed); moveDirection = Utils.Instance.GetMousePosition() - transform.position; moveDirection.z = 0; moveDirection.Normalize(); endPosition = Utils.Instance.GetMousePosition(); }
private void Awake() { abilityData = AbilityDataCache.GetDataForAbility(name); effect = GetComponent <AbilityEffect>(); if (GetComponent <AbilityDuration>() != null) { isStatic = true; } else { isStatic = false; } projectileVisuals = GetComponent <ProjectileVisuals>(); }
private void Awake() { duration = AbilityDataCache.GetDataForAbility(name).stats.duration; Debug.Log("AbilityDuration Duration for " + name + " is " + duration); if (duration <= 0f) { Debug.Log("AbilityDuration Warning duration not set for ability " + name); } AbilitySpawnTween tween = GetComponent <AbilitySpawnTween>(); if (tween) { duration += tween.duration; } visuals = GetComponent <ProjectileVisuals>(); }
private void Start() { // Get duration for the Dust Dusk dustDuskDuration = AbilityDataCache.GetDataForAbility("Dust Dusk").stats.duration; // Store all the particle systems from the Dusk Dusk so we can stop the and the disable the DD object int duskDustParticlesSize = dustDusk.transform.childCount + 1; duskDuskParticles = new ParticleSystem[duskDustParticlesSize]; Debug.Log("EnvironmentManager Start Dust Dusk duskDustParticlesSize" + duskDustParticlesSize); Debug.Log("EnvironmentManager Start Dust Dusk ParticleSystems in children" + dustDusk.GetComponentsInChildren <ParticleSystem>().Length); // Cache the particlesystems from the children int index = 0; foreach (ParticleSystem pS in dustDusk.GetComponentsInChildren <ParticleSystem>()) { Debug.Log("EnvironmentManager Start Dust Dusk Index " + index); duskDuskParticles[index] = pS; index++; } }
private void Start() { Debug.Log("SpellIndicator for player " + playerID); playerTransform = LocalPlayerReferences.playerTransform; spriteRenderer = GetComponent <SpriteRenderer>(); Debug.Log("SpellIndicator before name is " + name); string spName = name.Replace("SpellIndicator(Clone)", ""); Debug.Log("SpellIndicator after name is " + spName); castRange = AbilityDataCache.GetAbilityCastRange(spName); Debug.Log("SpellIndicator castRange is " + castRange); alphaInCastRange = alphaInCastRange / 10; alphaOutOfCastRange = alphaOutOfCastRange / 10; inRangeSprite = spriteRenderer.sprite; outOfRangeSprite = AbilityDataCache.GetSpellIndicatorOutOfRangeSprite(); inRangeScale = spriteRenderer.transform.localScale; outOfRangeSpriteScale = new Vector3(0.36f, 0.36f, 1); }