Ejemplo n.º 1
0
 public void CreateUnits()
 {
     for (int i = 0; i < NumberOfUnits; i++)
     {
         AI.Elements UnitElem = (AI.Elements)Random.Range(0, AI.Elements.GetNames(typeof(AI.Elements)).Length);
         SO1.GameMaster.AI.NewAI(UnitElem);
     }
 }
Ejemplo n.º 2
0
 public AIUnit(AI.Elements UT)
 {
     UnitType = UT;
     Health   = 100;
     Mana     = 100;
     Stamina  = 100;
     for (int i = 0; i <= 4; i++)
     {
         Moves.NewMove Move = new Moves.NewMove(UnitType);
         Abilities.Add(Move);
     }
 }
Ejemplo n.º 3
0
    public void ParticleSelect(AI.Elements SpellType, ParticleSystem SpellPS)
    {
        ParticleSystem.MainModule              Main = SpellPS.main;
        ParticleSystem.EmissionModule          EM   = SpellPS.emission;
        ParticleSystem.ColorOverLifetimeModule CLT  = SpellPS.colorOverLifetime;

        switch (SpellType)
        {
        case AI.Elements.Fire:
            Main.startColor = Color.red;
            EM.enabled      = true;
            EM.SetBursts(new ParticleSystem.Burst[]
            {
                new ParticleSystem.Burst(2.0f, 1),
                new ParticleSystem.Burst(4.0f, 1)
            });
            Gradient Grad = new Gradient();
            CLT.enabled = true;
            Grad.SetKeys(new GradientColorKey[] { new GradientColorKey(Color.blue, 0.0f), new GradientColorKey(Color.red, 1.0f) }, new GradientAlphaKey[] { new GradientAlphaKey(1.0f, 0.0f), new GradientAlphaKey(0.0f, 1.0f) });
            CLT.color = Grad;
            break;

        case AI.Elements.Water:
            break;

        case AI.Elements.Electric:
            break;

        case AI.Elements.Nature:
            break;

        case AI.Elements.Rock:
            break;

        default:     // Shouldn't hit this case
            break;
        }
    }