public void Copy(MecanimEvent other) { this.normalizedTime = other.normalizedTime; this.functionName = other.functionName; this.paramType = other.paramType; switch (this.paramType) { case MecanimEventParamTypes.Int32: this.intParam = other.intParam; break; case MecanimEventParamTypes.Float: this.floatParam = other.floatParam; break; case MecanimEventParamTypes.String: this.stringParam = other.stringParam; break; case MecanimEventParamTypes.Boolean: this.boolParam = other.boolParam; break; } this.condition = new EventCondition(); this.condition.conditions = new List <EventConditionEntry>(other.condition.conditions); this.critical = other.critical; this.isEnable = other.isEnable; }
public MecanimEvent(MecanimEvent other) { normalizedTime = other.normalizedTime; functionName = other.functionName; paramType = other.paramType; switch (paramType) { case MecanimEventParamTypes.Int32: intParam = other.intParam; break; case MecanimEventParamTypes.Float: floatParam = other.floatParam; break; case MecanimEventParamTypes.String: stringParam = other.stringParam; break; case MecanimEventParamTypes.Boolean: boolParam = other.boolParam; break; } condition = new EventCondition(); condition.conditions = new List <EventConditionEntry>(other.condition.conditions); critical = other.critical; isEnable = other.isEnable; }
public void Reset() { this.normalizedTime = 0f; this.functionName = null; this.paramType = MecanimEventParamTypes.None; this.intParam = 0; this.floatParam = 0f; this.stringParam = null; this.boolParam = false; this.condition.Reset(); this.critical = false; this.isEnable = false; }