Esempio n. 1
0
    public void LevelthreeSpell(int lvl3choiceNOW)
    {
        CastSpell  cast  = CastSpell.FindObjectOfType <CastSpell>();
        DoubleCast dCast = DoubleCast.GetComponent <DoubleCast>();
        SplitCast  split = SplitCast.GetComponent <SplitCast>();
        Companion  Corb  = CompOrb.GetComponent <Companion>();

        if (lvl3choiceNOW == 1)
        { // Multicast
            cast.doubleCast = dCast.doubleCast;
            cast.cd1Per     = dCast.cooldownPercent;
            cast.splitCast  = false;
            cast.damage1Per = dCast.damagePercent;
            cast.CompOrb    = false;
        }

        if (lvl3choiceNOW == 2)
        { // Splitcast
            cast.doubleCast = false;
            cast.splitCast  = split.splitCast;
            cast.cd1Per     = split.cooldownPercent;
            cast.damage1Per = split.damagePercent;
            cast.CompOrb    = false;
        }

        if (lvl3choiceNOW == 3)
        { //CompOrb
            cast.CompOrbCD  = Corb.Cooldown;
            cast.CompOrbDur = Corb.duration;
            cast.CompOrb    = Corb.CompOrb;
            cast.damage1Per = Corb.damagePercent;
            cast.cd1Per     = Corb.cooldownPercent;
            cast.doubleCast = false;
            cast.splitCast  = false;
        }
        if (lvl3choiceNOW == 4)
        { // Multicast
            cast.doubleCast = dCast.doubleCast;
            cast.cd1Per     = dCast.cooldownPercent * split.cooldownPercent;
            cast.splitCast  = true;
            cast.damage1Per = dCast.damagePercent * split.damagePercent;
            cast.CompOrb    = false;
        }



        if (lvl3choiceNOW == 0)
        {
            cast.damage1Per = 1f;
            cast.doubleCast = false;
            cast.splitCast  = false;
            cast.CompOrb    = false;
            cast.cd1Per     = 1f;
        }
    }
Esempio n. 2
0
        public void ShouldSuccesfullyEvaluateDoubleCastRegardlessOfCulture()
        {
            foreach (var ci in TestedCultureInfos)
            {
                TestTools.ExecuteWithChangedCulture(ci, () =>
                {
                    // given
                    var cast = new DoubleCast(new ConstantTerm(3.4d.ToLiteral(_graph)));

                    // when
                    IValuedNode valuedNode = cast.Evaluate(new SparqlEvaluationContext(new SparqlQuery(), new InMemoryDataset()), 0);

                    // then
                    Assert.AreEqual(3.4d, valuedNode.AsDouble());
                });
            }
        }
Esempio n. 3
0
 private void Awake()
 {
     _initialLocalScale = art.localScale;
     _artAnimator       = art.GetComponent <Animator>();
     _boxCollider       = GetComponent <BoxCollider2D>();
     _synchronizer      = Utils.FindObjectOfTypeOrThrow <SongSynchronizer>();
     _dashTime          = dashDuration;
     _dashing           = false;
     _rigidbody         = GetComponent <Rigidbody2D>();
     _input             = new PlayerInput();
     _levelManager      = Utils.FindObjectOfTypeOrThrow <LevelManager>();
     _upCast            = new DoubleCast(_boxCollider, Vector2.up, surfaceRayLength, new Vector2(0.5f, 1), wallsLayerMask);
     _rightCast         = new DoubleCast(_boxCollider, Vector2.right, surfaceRayLength, new Vector2(1, 0.5f), wallsLayerMask);
     _downCast          = new DoubleCast(_boxCollider, Vector2.down, surfaceRayLength, new Vector2(0.5f, 1), wallsLayerMask);
     _leftCast          = new DoubleCast(_boxCollider, Vector2.left, surfaceRayLength, new Vector2(1, 0.5f), wallsLayerMask);
     _yCast             = new DoubleCast(_boxCollider, Vector2.zero, 0, new Vector2(1, 0.5f), wallsLayerMask);
     _xCast             = new DoubleCast(_boxCollider, Vector2.zero, 0, new Vector2(0.5f, 1), wallsLayerMask);
 }
Esempio n. 4
0
 public void Start()
 {
     gm         = FindObjectOfType <GameManager>();
     fire       = AllSpells[0].GetComponent <Fireball>();
     frost      = AllSpells[1].GetComponent <FrostBolt>();
     lightning  = AllSpells[2].GetComponent <LightningBolt>();
     meteor     = AllSpells[5].GetComponent <Meteor>();
     cone       = AllSpells[3].GetComponent <Cone>();
     ghostcast  = AllSpells[4].GetComponent <GhostCast>();
     doublecast = AllSpells[6].GetComponent <DoubleCast>();
     splitcast  = AllSpells[7].GetComponent <SplitCast>();
     companion  = AllSpells[8].GetComponent <Companion>();
     boost      = AllSpells[9].GetComponent <Boost>();
     hasten     = AllSpells[10].GetComponent <Hasten>();
     empower    = AllSpells[11].GetComponent <Empower>();
     blackhole  = AllSpells[12].GetComponent <BlackHole>();
     push       = AllSpells[13].GetComponent <Push>();
     pool       = AllSpells[14].GetComponent <Pool>();
     chaosorb   = AllSpells[15].GetComponent <ChaosOrb>();
     channling  = AllSpells[16].GetComponent <Channeling>();
     blessedaim = AllSpells[17].GetComponent <BlessedAim>();
 }
Esempio n. 5
0
 public void Visit(DoubleCast uno)
 {
     uno.Left.Visit(this);
     Emit("conv." + MiniType.Double.ToPrimitive());
 }