本文整理汇总了C#中MyMwcVector3Int类的典型用法代码示例。如果您正苦于以下问题:C# MyMwcVector3Int类的具体用法?C# MyMwcVector3Int怎么用?C# MyMwcVector3Int使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MyMwcVector3Int类属于命名空间,在下文中一共展示了MyMwcVector3Int类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MyRenderObject
public MyMwcVector3Int? RenderCellCoord; //Render cell coordinate if voxel
public MyRenderObject(MyEntity entity, MyMwcVector3Int? renderCellCoord)
{
Entity = entity;
Flags = MyElementFlag.EF_AABB_DIRTY;
m_renderFlags = RenderFlags.SkipIfTooSmall | RenderFlags.NeedsResolveCastShadow;
RenderCellCoord = renderCellCoord;
}
示例2: MyStealthPlayground
public MyStealthPlayground()
{
ID = MyMissionID.STEALTH_PLAYGROUND; /* ID must be added to MyMissions.cs */
DebugName = new StringBuilder("Stealth playground");
Name = Localization.MyTextsWrapperEnum.EmptyDescription;
Description = Localization.MyTextsWrapperEnum.EmptyDescription;
MyMwcVector3Int baseSector = new MyMwcVector3Int(-2, 0, 0);
Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation);
RequiredMissions = new MyMissionID[] { MyMissionID.STEALTH_PLAYGROUND };
RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN };
m_objectives = new List<MyObjective>();
//var playgroundSubmission = new MySubmission(
// new StringBuilder("Move like a ninja!"),
// MyMissionID.PLAYGROUND_SUBMISSION_01,
// new StringBuilder(""),
// null,
// this,
// new MyMissionID[] { },
// new MyMissionLocation(baseSector, 831)
//);
//playgroundSubmission.OnMissionSuccess += PlaygroundSubmissionSubmissionSuccess;
//m_submissions.Add(playgroundSubmission);
}
示例3: MySmallPirateBase2Mission
public MySmallPirateBase2Mission()
{
ID = MyMissionID.SMALL_PIRATE_BASE_2; /* ID must be added to MyMissions.cs */
DebugName = new StringBuilder("Small pirate base 2"); // Nazev mise
Name = MyTextsWrapperEnum.SMALL_PIRATE_BASE_2;
Description = MyTextsWrapperEnum.SMALL_PIRATE_BASE_2_Description;
MyMwcVector3Int baseSector = new MyMwcVector3Int(9708260,0,-2101810); // Story sector of the script
Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); // Starting dummy point
RequiredMissions = new MyMissionID[] { }; // mise ktere musi byt splneny pred prijetim teto mise
RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.SMALL_PIRATE_BASE_2_KILL_GENERAL };
RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN, MyActorEnum.TARJA, MyActorEnum.VALENTIN };
m_objectives = new List<MyObjective>(); // Creating of list of submissions
// START DEFINICE SUBMISE
/* DestroyEnemies = new MyObjectiveDestroy( // Var is used to call functions on that member
new StringBuilder("Destroy the mothership"),
MyMissionID.SMALL_PIRATE_BASE_2_DESTROY_MOTHERSHIP,
new StringBuilder(""),
null,
this,
new MyMissionID[] { },
new List<uint> { (uint)EntityID.Mothership },
new List<uint> { },
false
) { SaveOnSuccess = false };
m_objectives.Add(DestroyEnemies); // pridani do seznamu submisi*/
DestroyGenerator = new MyObjectiveDestroy( // Var is used to call functions on that member
new StringBuilder("Destroy the generators"),
MyMissionID.SMALL_PIRATE_BASE_2_DESTROY_GENERATOR,
new StringBuilder(""),
null,
this,
new MyMissionID[] { },
generators,
false
) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudGenerator };
m_objectives.Add(DestroyGenerator); // pridani do seznamu submisi
/*DestroyGenerator.MissionEntityIDs.Add((uint)EntityID.Generator_3);
DestroyGenerator.MissionEntityIDs.Add((uint)EntityID.Generator_2);
DestroyGenerator.MissionEntityIDs.Add((uint)EntityID.Generator);*/
var ReturnToMothership = new MyObjective( // One member of that list - je to MySubmission takze cilem je doletet do checkpointu
new StringBuilder("Return to your mothership"), // nazev submise
MyMissionID.SMALL_PIRATE_BASE_2_KILL_GENERAL, // id submise
new StringBuilder(""), // popis submise
null,
this,
new MyMissionID[] { MyMissionID.SMALL_PIRATE_BASE_2_DESTROY_GENERATOR, }, // ID submisi ktere musi byt splneny - je to prazdne takze je to prvni submise
new MyMissionLocation(baseSector, MyMissionLocation.MADELYN_HANGAR), // ID of dummy point of checkpoint
radiusOverride: MyMissionLocation.MADELYN_HANGAR_RADIUS
) { SaveOnSuccess = false, HudName = MyTextsWrapperEnum.HudMadelynsSapho }; // nastaveni save na checkpointu nebo ne
m_objectives.Add(ReturnToMothership); // pridani do seznamu submisi
}
示例4: MyMedina622Mission
//BLOCK FOR CLASS MEMBERS
//END OF BLOCK
public MyMedina622Mission()
{
ID = MyMissionID.TRADE_STATION_ARABS; /* ID must be added to MyMissions.cs */
DebugName = new StringBuilder("Medina 622 mission"); // Name of mission
Name = Localization.MyTextsWrapperEnum.MEDINA_622;
Description = Localization.MyTextsWrapperEnum.MEDINA_622_Description; // Description of mission - do not forget to \n at the end of each line
//Flags = MyMissionFlags.Story;
MyMwcVector3Int baseSector = new MyMwcVector3Int(4027778, 0, 861110); // Story sector of the script - i.e. (-2465,0,6541)
Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); // Starting dummy point - must by typecasted to uint and referenced from EntityID enum
RequiredMissions = new MyMissionID[] { /*MyMissionID.ALIEN_GATE*/ }; // IDs of missions required to make this mission available
RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN };
m_objectives = new List<MyObjective>(); // Creating of list of submissions
//// START OF REACH OBJECTIVE SUBMISSION DEFINITION
//var flyInside = new MyObjective( // One member of that list - its type defines the type of submission - MySubmission means fly to the dummypoint to success. Here it is var so you cannot call methods on it
// new StringBuilder("Fly over there"), // Name of the submission
// MyMissionID.TRADE_STATION_ARABS_FLY_TARGET, // ID of the submission - must be added to MyMissions.cs
// new StringBuilder(""), // Description of the submission
// null,
// this,
// new MyMissionID[] { }, // ID of submissions required to make this submission available - it is clear so this submission is the starting submission
// new MyMissionLocation(baseSector, (uint)EntityID.FlyTarget) // ID of dummy point of checkpoint
//) { SaveOnSuccess = false }; // False means do not save game in that checkpoint
//m_objectives.Add(flyInside); // Adding this submission to the list of submissions of current mission
//// END OF REACH OBJECTIVE SUBMISSION DEFINITION
}
示例5: IsSectorInArea
public bool IsSectorInArea(MyMwcVector3Int sectorPosition)
{
Vector3 sectorPos = MySolarSystemUtils.SectorsToKm(sectorPosition);
Vector3 fromSectorToCenter = sectorPos - Position;
float fromSectorToCenterDist = fromSectorToCenter.Length();
return fromSectorToCenterDist <= Radius;
}
示例6: MyVoxelPrecalcTaskItem
public MyVoxelPrecalcTaskItem(MyLodTypeEnum type, MyVoxelMap voxelMap, MyVoxelCacheCellData cache, MyMwcVector3Int voxelStart)
{
Type = type;
VoxelMap = voxelMap;
Cache = cache;
VoxelStart = voxelStart;
}
示例7: MyGuiScreenEnterSectorProgress
public MyGuiScreenEnterSectorProgress(MyMwcTravelTypeEnum travelType, MyMwcVector3Int targetSectorPosition, Vector3 currentShipPosition, System.Action<MyMwcObjectBuilder_Sector, Vector3> enterSectorSuccessfulAction)
: base(MyTextsWrapperEnum.EnterSectorInProgressPleaseWait, false)
{
m_backgroundFadeColor = MyGuiConstants.SCREEN_BACKGROUND_FADE_BLANK_DARK_PROGRESS_SCREEN;
m_travelType = travelType;
m_targetSectorPosition = targetSectorPosition;
m_currentShipPosition = currentShipPosition;
m_enterSectorSuccessfulAction = enterSectorSuccessfulAction;
}
示例8: MySmallPirateBase2
public MySmallPirateBase2()
{
ID = MyMissionID.SMALL_PIRATE_BASE_2; /* ID must be added to MyMissions.cs */
Name = new StringBuilder("Small pirate base 2"); // Nazev mise
Description = new StringBuilder( // popis mise
"Destroy the station\n"
);
MyMwcVector3Int baseSector = new MyMwcVector3Int(9708260,0,-2101810); // Story sector of the script
Location = new MyMissionLocation(baseSector, 1749); // Starting dummy point
RequiredMissions = new MyMissionID[] { }; // mise ktere musi byt splneny pred prijetim teto mise
m_submissions = new List<MyObjective>(); // Creating of list of submissions
// START DEFINICE SUBMISE
DestroyEnemies = new MyObjectiveDestroy( // Var is used to call functions on that member
new StringBuilder("Destroy the mothership"),
MyMissionID.SMALL_PIRATE_BASE_2_DESTROY_ENEMIES,
new StringBuilder(""),
null,
this,
new MyMissionID[] { },
new List<uint> { 5293 },
new List<uint> { },
false
) { SaveOnSuccess = false };
m_submissions.Add(DestroyEnemies); // pridani do seznamu submisi
DestroyGenerator = new MyObjectiveDestroy( // Var is used to call functions on that member
new StringBuilder("Destroy the generator"),
MyMissionID.SMALL_PIRATE_BASE_2_DESTROY_GENERATOR,
new StringBuilder(""),
null,
this,
new MyMissionID[] { },
new List<uint> { 812 },
new List<uint> { },
false
) { SaveOnSuccess = false };
m_submissions.Add(DestroyGenerator); // pridani do seznamu submisi
var escape = new MyObjective( // One member of that list - je to MySubmission takze cilem je doletet do checkpointu
new StringBuilder("Return to the mothership"), // nazev submise
MyMissionID.PIRATE_BASE_1_ESCAPE, // id submise
new StringBuilder(""), // popis submise
null,
this,
new MyMissionID[] { MyMissionID.PIRATE_BASE_1_DESTROY_GENERATOR, }, // ID submisi ktere musi byt splneny - je to prazdne takze je to prvni submise
new MyMissionLocation(baseSector, 2475) // ID of dummy point of checkpoint
) { SaveOnSuccess = false }; // nastaveni save na checkpointu nebo ne
m_submissions.Add(escape); // pridani do seznamu submisi
}
示例9: SetMaterialAndIndestructibleContent
// Change material for specified voxel
// If this material is single material for whole cell, we do nothing. Otherwise we allocate 3D arrays and start using them.
public void SetMaterialAndIndestructibleContent(MyMwcVoxelMaterialsEnum material, byte indestructibleContent, ref MyMwcVector3Int voxelCoordInCell)
{
CheckInitArrays(material);
if (m_singleMaterialForWholeCell == false)
{
int xyz = voxelCoordInCell.X * xStep + voxelCoordInCell.Y * yStep + voxelCoordInCell.Z * zStep;
m_materials[xyz] = material;
m_indestructibleContent[xyz] = indestructibleContent;
}
}
示例10: GetIndestructibleContent
// Same as GetMaterial() - but this is for indestructible content
public byte GetIndestructibleContent(ref MyMwcVector3Int voxelCoordInCell)
{
if (m_singleMaterialForWholeCell == true)
{
return m_singleIndestructibleContent;
}
else
{
return m_indestructibleContent[voxelCoordInCell.X * xStep + voxelCoordInCell.Y * yStep + voxelCoordInCell.Z * zStep];
}
}
示例11: MyGuiScreenLoadCheckpointProgress
public MyGuiScreenLoadCheckpointProgress(MyMwcSectorTypeEnum sessionType, MyMwcSessionStateEnum sessionStartType, int? userId, MyMwcVector3Int? position, string checkpointName, System.Action<MyMwcObjectBuilder_Checkpoint> enterSectorSuccessfulAction)
: base(MyTextsWrapperEnum.EnterSectorInProgressPleaseWait, false, TimeSpan.FromSeconds(360)) // Some missions loads very long (Roch's junkyard)
{
m_backgroundFadeColor = MyGuiConstants.SCREEN_BACKGROUND_FADE_BLANK_DARK_PROGRESS_SCREEN;
m_sessionType = sessionType;
m_sessionStartType = sessionStartType;
m_userId = userId;
m_sectorPosition = position;
m_checkpointName = checkpointName;
m_loadCheckpointSuccessfulAction = enterSectorSuccessfulAction;
}
示例12: MyChineseSolarArrayAttackMission
//BLOCK FOR CLASS MEMBERS
//END OF BLOCK
public MyChineseSolarArrayAttackMission()
{
ID = MyMissionID.SOLAR_PLANT_CHINA; /* ID must be added to MyMissions.cs */
DebugName = new StringBuilder("Destroy the Chinese solar plant"); // Name of mission
Name = MyTextsWrapperEnum.SOLAR_PLANT_CHINA;
Description = MyTextsWrapperEnum.SOLAR_PLANT_CHINA_Description;
//Flags = MyMissionFlags.Story;
MyMwcVector3Int baseSector = new MyMwcVector3Int(-1185103, 0, 3822834); // Story sector of the script - i.e. (-2465,0,6541)
Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); // Starting dummy point - must by typecasted to uint and referenced from EntityID enum
RequiredMissions = new MyMissionID[] { /*MyMissionID.ALIEN_GATE*/ }; // IDs of missions required to make this mission available
RequiredMissionsForSuccess = new MyMissionID[] { MyMissionID.SOLAR_PLANT_CHINA_FLY_TARGET };
RequiredActors = new MyActorEnum[] { MyActorEnum.MARCUS, MyActorEnum.MADELYN };
m_objectives = new List<MyObjective>(); // Creating of list of submissions
//var destroy1 = new MyObjectiveDestroy(
// new StringBuilder("Destroy the comm station"),
// MyMissionID.SOLAR_PLANT_CHINA_DESTROY_TARGET_1,
// new StringBuilder("Destroy the satellite communication station to prevent the Chinese from calling reinforcements.\n"),
// null,
// this,
// new MyMissionID[] { },
// new List<uint>() { (uint)EntityID.DestroyPrefab1Id }
//) { SaveOnSuccess = false };
//m_objectives.Add(destroy1);
//var destroy2 = new MyObjectiveDestroy(
// new StringBuilder("Destroy the accumulators"),
// MyMissionID.SOLAR_PLANT_CHINA_DESTROY_TARGET_2,
// new StringBuilder("Destroying three accumulators will seriously disrupt the energy supply of the Chinese.\n"),
// null,
// this,
// new MyMissionID[] { MyMissionID.SOLAR_PLANT_CHINA_DESTROY_TARGET_1 },
// new List<uint>() { (uint)EntityID.DestroyPrefab2Id, (uint)EntityID.DestroyPrefab3Id, (uint)EntityID.DestroyPrefab4Id }
//) { SaveOnSuccess = false };
//m_objectives.Add(destroy2);
//// START OF REACH OBJECTIVE SUBMISSION DEFINITION
//var flyInside = new MyObjective( // One member of that list - its type defines the type of submission - MySubmission means fly to the dummypoint to success. Here it is var so you cannot call methods on it
// new StringBuilder("Return to Madelyn"), // Name of the submission
// MyMissionID.SOLAR_PLANT_CHINA_FLY_TARGET, // ID of the submission - must be added to MyMissions.cs
// new StringBuilder("Fly to your mothership to get away.\n"), // Description of the submission
// null,
// this,
// new MyMissionID[] { MyMissionID.SOLAR_PLANT_CHINA_DESTROY_TARGET_2 }, // ID of submissions required to make this submission available - it is clear so this submission is the starting submission
// new MyMissionLocation(baseSector, (uint)EntityID.FlyTarget) // ID of dummy point of checkpoint
//) { SaveOnSuccess = false }; // False means do not save game in that checkpoint
//m_objectives.Add(flyInside); // Adding this submission to the list of submissions of current mission
//// END OF REACH OBJECTIVE SUBMISSION DEFINITION
}
示例13: GetSectorInterpolator
public override float GetSectorInterpolator(MyMwcVector3Int sectorPosition)
{
Vector3 sectorPos = MySolarSystemUtils.SectorsToKm(sectorPosition);
Vector3 fromSectorToCenter = sectorPos - Position;
float fromSectorToCenterDist = fromSectorToCenter.Length();
if (fromSectorToCenterDist > Radius)
{
// Out of circle zone
return 0;
}
float cubicInterpolator = MathHelper.SmoothStep(0, 1, fromSectorToCenterDist / Radius);
return cubicInterpolator;
}
示例14: MyNewNanjingMission
public MyNewNanjingMission()
{
ID = MyMissionID.NEW_NANJING; /* ID must be added to MyMissions.cs */
DebugName = new StringBuilder("New Nanjing"); // Name of mission
Name = MyTextsWrapperEnum.NEW_NANJING;
Description = MyTextsWrapperEnum.NEW_NANJING_Description;
MyMwcVector3Int baseSector = new MyMwcVector3Int(719329, 0, 3942993); // Story sector of the script - i.e. (-2465,0,6541)
RequiredMissions = new MyMissionID[] { };
Location = new MyMissionLocation(baseSector, (uint)EntityID.StartLocation); // Starting dummy point - must by typecasted to uint and referenced from EntityID enum
RequiredActors = new MyActorEnum[] { MyActorEnum.MADELYN };
m_objectives = new List<MyObjective>(); // Creating of list of submissions
}
示例15: GetMaterial
// Return material for specified voxel. If whole cell contain one single material, this one is returned. Otherwise material from 3D array is returned.
public MyMwcVoxelMaterialsEnum GetMaterial(ref MyMwcVector3Int voxelCoordInCell)
{
if (MyFakes.SINGLE_VOXEL_MATERIAL != null)
return MyFakes.SINGLE_VOXEL_MATERIAL.Value;
if (m_singleMaterialForWholeCell == true)
{
return m_singleMaterial;
}
else
{
return m_materials[voxelCoordInCell.X * xStep + voxelCoordInCell.Y * yStep + voxelCoordInCell.Z * zStep];
}
}