Esempio n. 1
0
    private void Start()
    {
        Damage   = 5f;
        MaxPoint = GameObject.FindGameObjectWithTag("Shield").transform.position.y;

        MyType = (Type.ElementalType)Random.Range(0, 2);

        InitialHealth = 20;
        Health        = InitialHealth;
        Speed         = InitialSpeed;

        if (MyType == Type.ElementalType.Grass)
        {
            InitialColor = Color.green;
        }
        else if (MyType == Type.ElementalType.Fire)
        {
            InitialColor = Color.red;
        }
        else if (MyType == Type.ElementalType.Water)
        {
            InitialColor = Color.blue;
        }
        else
        {
            InitialColor = Color.white;
        }

        ResetColor();
    }
Esempio n. 2
0
    public void Activate(Vector3 target, Type.ElementalType type)
    {
        print("Activated");
        gameObject.SetActive(true);
        Target = target;

        print("My target: " + Target);
        print("Supposed target:" + target);
        MyType = type;
        Recolor();
    }
Esempio n. 3
0
    public float GetMultiplier(Type.ElementalType caster, Type.ElementalType target)
    {
        Pair Pairing = new Pair(caster, target);

        if (MultiplierChart.ContainsKey(Pairing))
        {
            return(MultiplierChart[Pairing]);
        }

        return(0f);
    }
Esempio n. 4
0
 public Pair(Type.ElementalType c, Type.ElementalType t)
 {
     caster = c;
     target = t;
 }
Esempio n. 5
0
 public void SetElement(Type.ElementalType elem)
 {
     element = elem;
     print("New element is: " + element);
 }