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(); }
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(); }
public float GetMultiplier(Type.ElementalType caster, Type.ElementalType target) { Pair Pairing = new Pair(caster, target); if (MultiplierChart.ContainsKey(Pairing)) { return(MultiplierChart[Pairing]); } return(0f); }
public Pair(Type.ElementalType c, Type.ElementalType t) { caster = c; target = t; }
public void SetElement(Type.ElementalType elem) { element = elem; print("New element is: " + element); }