Exemplo n.º 1
0
 public void Initalize(GridCell d, SkillAbstract _skill)
 {
     destination = d;
     skill       = _skill;
     transform.LookAt(d.transform);
     LeanTween.move(gameObject, new Vector3(d.transform.position.x, d.transform.position.y, d.transform.position.z), 1f / projectileSpeed).setOnComplete(TravelComplete).setEase(travelType);
 }
Exemplo n.º 2
0
 public void Initalize(GridCell d, SkillAbstract _skill)
 {
     skill       = _skill;
     lastPos     = new Vector3(transform.position.x, transform.position.y, transform.position.z);
     destination = d;
     LeanTween.move(gameObject, Vector3.Lerp(d.transform.position, transform.position, 0.5f) + new Vector3(0, arcHeight, 0), 0.5f / projectileSpeed).setOnComplete(StartFall).setEase(upEase);
 }
        public override void Initialize(List <GridCell> cells, SkillAbstract skill, IntVector2 origin)
        {
            GameObject ob = Instantiate(projectilePrefab, transform.position, transform.rotation);

            ob.GetComponent <FlameCrossProjectile>().Initalize(cells, skill);
            Destroy(gameObject, lifeTime);
        }
Exemplo n.º 4
0
 public void Initalize(List <GridCell> _cells, SkillAbstract _skill)
 {
     cells = _cells;
     skill = _skill;
     LeanTween.move(gameObject, cells[0].transform.position + impactOffset, 1f / projectileSpeed).setOnComplete(TravelComplete).setEase(projectileEase);
     transform.LookAt(cells[0].transform);
 }
 public void Initalize(GridCell cell, SkillAbstract skill, bool excute)
 {
     if (excute)
     {
         skill.Excute(Time.deltaTime, cell);
     }
     Destroy(gameObject, lifeTime);
 }
Exemplo n.º 6
0
        public void Initalize(GridCell cell, SkillAbstract _skill)
        {
            destination = cell;
            skill       = _skill;
            Vector3 offsetPos = new Vector3(cell.transform.position.x, cell.transform.position.y + offset, cell.transform.position.z);

            transform.LookAt(offsetPos);
            LeanTween.move(gameObject, offsetPos, 1f / projectileSpeed).setOnComplete(TravelComplete).setEase(projectileTween);
        }
 public void Initalize(List <GridCell> cells, SkillAbstract skill)
 {
     foreach (GridCell cell in cells)
     {
         GameObject ob = Instantiate(smallProjectilePrefab, transform.position, Quaternion.identity);
         ob.GetComponent <FlameCrossSmallProjectile>().Initalize(cell, skill);
     }
     Destroy(gameObject, lifeTime);
 }
 public override void Initialize(List <GridCell> cells, SkillAbstract skill, IntVector2 origin)
 {
     foreach (GridCell cell in cells)
     {
         transform.LookAt(cell.transform);
         GameObject ob = Instantiate(projectilePrefab, transform.position, Quaternion.identity);
         ob.GetComponent <InstantCastProjectile>().Initalize(cell, skill);
         Destroy(gameObject, lifeTime);
     }
 }
Exemplo n.º 9
0
 public void SwitchSkill(SkillAbstract skillScript)
 {
     if (currentCharacter.stateManager.characterState != CharacterState.IsInteracting)
     {
         currentCharacter.selectedSkill = skillScript;
         if (skillScript == null || skillScript.skill.type == SkillType.Move)
         {
             GridManager.Instance.HighlightNavDict(currentCharacter.taticalMovement.currentNavDict);
         }
         else
         {
             GridManager.Instance.RemoveAllHighlights();
         }
     }
 }
Exemplo n.º 10
0
 public void UpdateSlot(CharacterStats characterStats, AnimationHandler animationHandler,
                        TaticalMovement taticalMovement, CombatUtils combatUtils)
 {
     if (skill == null)
     {
         slotIconPanel.GetComponent <Image>().sprite = defaultSprite;
     }
     else
     {
         slotIconPanel.GetComponent <Image>().sprite = skill.icon;
         skillScript = skill.skillScriptObject.GetComponent <SkillAbstract>();
         skillScript = skillScript.AttachSkill(characterStats, animationHandler,
                                               taticalMovement, combatUtils, skill);
     }
 }
Exemplo n.º 11
0
 public void Initalize(GridCell cell, SkillAbstract _skill, bool _excute)
 {
     destination  = cell;
     skill        = _skill;
     excute       = _excute;
     offsetVector = new Vector3(
         Random.Range(-offsetRadius, offsetRadius),
         Random.Range(-offsetRadius, offsetRadius) + fixedUpOffset,
         Random.Range(-offsetRadius, offsetRadius)
         );
     transform.position += offsetVector;
     origin              = new Vector3(transform.position.x, transform.position.y, transform.position.z);
     offsetDestination   = cell.transform.position + offsetVector * offsetDecrease;
     transform.LookAt(offsetDestination);
     transform.localScale = Vector3.zero;
     LeanTween.scale(gameObject, carrotSize, Random.Range(0.5f, 1.5f)).setOnComplete(GrowComplete);
 }
Exemplo n.º 12
0
        public override void Initialize(List <GridCell> cells, SkillAbstract skill, IntVector2 origin)
        {
            lifeTime = 1.5f;
            foreach (GridCell cell in cells)
            {
                int iters = Mathf.FloorToInt(Random.Range(lowerSpawn, upperSpawn));
                for (int i = 0; i < iters; i++)
                {
                    transform.LookAt(cell.transform);

                    GameObject ob = Instantiate(projectilePrefab,
                                                transform.position - Vector3.up * transform.position.y + Vector3.forward * 0.5f,
                                                Quaternion.identity);

                    ob.GetComponent <CarrotDeathProjectile>().Initalize(cell, skill, i == 0 ? true : false);
                    Destroy(gameObject, lifeTime);
                }
            }
        }
Exemplo n.º 13
0
 public override void Initialize(List <GridCell> cells, SkillAbstract _skill, IntVector2 origin)
 {
     rangeCells = new List <GridCell>();
     skill      = _skill;
     GridCell[] holdCells = cells.ToArray();
     for (int i = 0; i < holdCells.Length / 2; i++)
     {
         int index = Mathf.FloorToInt(Random.Range(0, holdCells.Length));
         if (rangeCells.Contains(holdCells[index]))
         {
             i--;
         }
         else
         {
             rangeCells.Add(holdCells[index]);
         }
     }
     LeanTween.scale(gameObject, Vector3.one * 10f, 1f).setOnComplete(ShootProjectile).setEase(expandType);
 }
Exemplo n.º 14
0
        public void HandleAlchemicalSkill(CharacterStats targetStats, SkillAbstract skillScript)
        {
            switch (skillScript.skill.type)
            {
            case SkillType.Fire:
                int fireDamage = (int)skillScript.alchemicalDamage.Value - (int)targetStats.fireResistance.Value;
                targetStats.TakeDamage(fireDamage);
                break;

            case SkillType.Water:
                int WaterDamage = (int)skillScript.alchemicalDamage.Value - (int)targetStats.waterResistance.Value;
                targetStats.TakeDamage(WaterDamage);
                break;

            case SkillType.Chill:
                int ChillDamage = (int)skillScript.alchemicalDamage.Value - (int)targetStats.waterResistance.Value;
                targetStats.TakeDamage(ChillDamage);
                break;
            }
        }
Exemplo n.º 15
0
 public override void Initialize(List <GridCell> cells, SkillAbstract _skill, IntVector2 origin)
 {
     rangeCells = new List <GridCell>();
     skill      = _skill;
     GridCell[] holdCells = cells.ToArray();
     transform.position = new Vector3(cells[0].transform.position.x, cells[0].transform.position.y, cells[0].transform.position.z);
     LeanTween.moveY(gameObject, hoverHeight, 0.5f).setOnComplete(ShootProjectile);
     for (int i = 0; i < holdCells.Length / 2; i++)
     {
         int index = Mathf.FloorToInt(Random.Range(0, holdCells.Length));
         if (rangeCells.Contains(holdCells[index]))
         {
             i--;
         }
         else
         {
             rangeCells.Add(holdCells[index]);
         }
     }
 }
Exemplo n.º 16
0
 public void Initalize(GridCell cell, SkillAbstract skill)
 {
     destination = cell;
     skill.Excute(Time.deltaTime, cell);
     Destroy(gameObject, lifeTime);
 }
Exemplo n.º 17
0
 public void UseSkill(SkillAbstract skillScript, float delta)
 {
     skillScript.Activate(delta);
 }
 public void Initalize(GridCell cell, SkillAbstract _skill)
 {
     destination = cell;
     skill       = _skill;
     LeanTween.move(gameObject, destination.transform.position + impactOffset, 1f / projectileSpeed).setOnComplete(TravelComplete).setEase(projectileTween);
 }
Exemplo n.º 19
0
 public void Initalize(GridCell cell, SkillAbstract skill)
 {
     skill.Excute(Time.deltaTime, cell);
     AlchemyManager.Instance.ApplyChill(cell);
     Destroy(gameObject, 0.75f);
 }
Exemplo n.º 20
0
 public void Initalize(GridCell cell, SkillAbstract skill)
 {
     skill.Excute(Time.deltaTime, cell);
     Destroy(gameObject, 1f);
 }
Exemplo n.º 21
0
 public override void Initialize(List <GridCell> cells, SkillAbstract skill, IntVector2 origin)
 {
     skill.Excute(Time.deltaTime, cells[0]);
     Destroy(gameObject, lifeTime);
 }
Exemplo n.º 22
0
 public abstract void Initialize(List <GridCell> cells, SkillAbstract skill, IntVector2 origin);