public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptShapeValue)model.CreateValue(ValueType); result.ShapeType = ShapeType; switch (ShapeType) { case MegaloScriptShapeType.Sphere: result.Radius = Radius; break; case MegaloScriptShapeType.Cylinder: result.Radius = Radius; result.Top = Top; result.Bottom = Bottom; break; case MegaloScriptShapeType.Box: result.Radius = Radius; result.Length = Length; result.Top = Top; result.Bottom = Bottom; break; case MegaloScriptShapeType.None: break; default: throw new KSoft.Debug.UnreachableException(ShapeType.ToString()); } return(result); }
public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptIndexValue)model.CreateValue(ValueType); result.Value = Value; return(result); }
public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptVarReferenceValue)model.CreateValue(ValueType); CopyVarTo(result); return(result); }
public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptVirtualTriggerValue)model.CreateValue(ValueType); result.VirtualTriggerHandle = VirtualTriggerHandle; return(result); }
public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptObjectReferenceWithPlayerVarIndexValue)model.CreateValue(ValueType); CopyVarTo(result); result.PlayerVarIndex = PlayerVarIndex; return(result); }
public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptNavpointIconParametersValue)model.CreateValue(ValueType); result.IconType = IconType; result.Numeric = Numeric; return(result); }
public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptTeamFilterParametersValue)model.CreateValue(ValueType); result.FilterType = FilterType; result.Player = Player; result.PlayerAddOrRemove = PlayerAddOrRemove; return(result); }
public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptPoint3dValue)model.CreateValue(ValueType); result.X = X; result.Y = Y; result.Z = Z; return(result); }
public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptWidgetMeterParametersValue)model.CreateValue(ValueType); result.Type = Type; result.Timer = Timer; result.Numeric1 = Numeric1; result.Numeric2 = Numeric2; return(result); }
public override MegaloScriptValueBase Copy(MegaloScriptModel model) { var result = (MegaloScriptTokensValue)model.CreateValue(ValueType); result.StringIndex = StringIndex; result.TokenCount = TokenCount; if (TokenCount >= 1) { result.Token0.CopyFrom(Token0); } if (TokenCount >= 2) { result.Token1.CopyFrom(Token1); } if (TokenCount >= 3) { result.Token2.CopyFrom(Token2); } return(result); }
public void InitializeEmptyValues(MegaloScriptModel model) { int change_count = 0; for (int x = 0; x < mValueIds.Length; x++) { if (mValueIds[x].IsNotNone()) { continue; } change_count++; var value = model.CreateValue(ProtoData.ParameterList[x].Type); mValueIds[x] = value.Id; } if (change_count > 0) { NotifyItemsInitialized(); } }