// Serialize Confuse private void SerializeAsConfuse(Confuse effect) { int index = 0; sizeofEffect = 0; // No additional info SerializeBaseEffect(effect, ref index); // No extra serialization }
public override void ApplyEffect(GameObject target) { // Ref the player stat class PlayerStats ps = target.GetComponent <PlayerStats>(); if (!ps) { Debug.LogError("No Player Stats class in target: " + target); return; } // Apply the effect Confuse confused = new Confuse(Lifetime); ps.AddEffect(confused); }
private void Start() { confusion = new Confuse(5.0f); }