本文整理汇总了C#中AC类的典型用法代码示例。如果您正苦于以下问题:C# AC类的具体用法?C# AC怎么用?C# AC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AC类属于命名空间,在下文中一共展示了AC类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Declare
public override void Declare (AC.Char _character)
{
character = _character;
turningIsLinear = true;
rootMotion = false;
isSpriteBased = true;
}
开发者ID:amutnick,项目名称:CrackTheCode_Repo,代码行数:7,代码来源:AnimEngine_Sprites2DToolkit.cs
示例2: DeleteAction
public static void DeleteAction(AC.Action action, ActionListAsset _target)
{
_target.actions.Remove (action);
Undo.DestroyObjectImmediate (action);
//UnityEngine.Object.DestroyImmediate (_action, true);
AssetDatabase.SaveAssets ();
}
开发者ID:mcbodge,项目名称:eidolon,代码行数:7,代码来源:ActionListAssetEditor.cs
示例3: magnifier_Magnify
void magnifier_Magnify(object sender, AC.AvalonControlsLibrary.Controls.MagnifyEventArgs e)
{
displayValue.Text = e.MagnifiedBy.ToString();
//as you can not depending on how much you try to magnify the speed of the magnification changes
//P.S the * 20 is there since we have a very small value for minimum and maximum
displayRect.Width = Math.Max(displayRect.Width - (e.MagnifiedBy * 20), 0);
}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:7,代码来源:MagnifierTest.xaml.cs
示例4: Declare
public virtual void Declare (AC.Char _character)
{
character = _character;
turningIsLinear = false;
rootMotion = false;
isSpriteBased = false;
}
开发者ID:amutnick,项目名称:CrackTheCode_Repo,代码行数:7,代码来源:AnimEngine.cs
示例5: ClickOutput
public void ClickOutput(AC.Menu _menu, MouseState _mouseState)
{
if (items.Count > 0)
{
if (_mouseState == MouseState.SingleClick)
{
if (KickStarter.runtimeInventory.selectedItem == null)
{
// Pick up created item
if (activeRecipe.onCreateRecipe == OnCreateRecipe.SelectItem)
{
KickStarter.runtimeInventory.PerformCrafting (activeRecipe, true);
}
else if (activeRecipe.onCreateRecipe == OnCreateRecipe.RunActionList)
{
KickStarter.runtimeInventory.PerformCrafting (activeRecipe, false);
if (activeRecipe.invActionList != null)
{
AdvGame.RunActionListAsset (activeRecipe.invActionList);
}
}
else
{
KickStarter.runtimeInventory.PerformCrafting (activeRecipe, false);
}
}
}
PlayerMenus.ResetInventoryBoxes ();
}
}
开发者ID:IJkeB,项目名称:Ekster_Final,代码行数:30,代码来源:MenuCrafting.cs
示例6: SharedGUITwo
protected void SharedGUITwo(AC.Char _target)
{
EditorGUILayout.BeginVertical ("Button");
EditorGUILayout.LabelField ("Rigidbody settings:", EditorStyles.boldLabel);
_target.ignoreGravity = EditorGUILayout.Toggle ("Ignore gravity?", _target.ignoreGravity);
_target.freezeRigidbodyWhenIdle = EditorGUILayout.Toggle ("Freeze when Idle?", _target.freezeRigidbodyWhenIdle);
EditorGUILayout.EndVertical ();
EditorGUILayout.BeginVertical ("Button");
EditorGUILayout.LabelField ("Audio clips:", EditorStyles.boldLabel);
_target.walkSound = (AudioClip) EditorGUILayout.ObjectField ("Walk sound:", _target.walkSound, typeof (AudioClip), false);
_target.runSound = (AudioClip) EditorGUILayout.ObjectField ("Run sound:", _target.runSound, typeof (AudioClip), false);
if (AdvGame.GetReferences ().speechManager != null && AdvGame.GetReferences ().speechManager.scrollSubtitles)
{
_target.textScrollClip = (AudioClip) EditorGUILayout.ObjectField ("Text scroll override:", _target.textScrollClip, typeof (AudioClip), false);
}
_target.soundChild = (Sound) EditorGUILayout.ObjectField ("Sound child:", _target.soundChild, typeof (Sound), true);
EditorGUILayout.EndVertical ();
EditorGUILayout.BeginVertical ("Button");
EditorGUILayout.LabelField ("Dialogue settings:", EditorStyles.boldLabel);
EditorGUILayout.LabelField ("Portrait graphic:");
_target.portraitIcon.ShowGUI (false);
_target.speechColor = EditorGUILayout.ColorField ("Speech text colour:", _target.speechColor);
_target.speechLabel = EditorGUILayout.TextField ("Speaker label:", _target.speechLabel);
EditorGUILayout.EndVertical ();
}
开发者ID:IJkeB,项目名称:Ekster_Final,代码行数:29,代码来源:CharEditor.cs
示例7: QRDialog
public QRDialog(AC.Pattern pattern)
{
this.pattern = pattern;
qrImage = CreateQRCode(pattern, 3);
InitializeComponent();
}
开发者ID:jefff,项目名称:animalcrossingqr,代码行数:7,代码来源:QRDialog.cs
示例8: CheckScreenSize
private void CheckScreenSize(AC.Menu menu)
{
if (screenSize.x != Screen.width || screenSize.y != Screen.height)
{
screenSize = new Vector2 (Screen.width, Screen.height);
menu.Recalculate ();
}
}
开发者ID:mcbodge,项目名称:eidolon,代码行数:8,代码来源:MenuPreview.cs
示例9: Setup
public void Setup(AC.Menu _menu, MenuElement _element, int _slot)
{
if (_menu == null)
{
return;
}
menu = _menu;
menuElement = _element;
slot = _slot;
}
开发者ID:IJkeB,项目名称:Ekster_Final,代码行数:11,代码来源:UISlotClick.cs
示例10: RangeSlider_RangeSelectionChanged
private void RangeSlider_RangeSelectionChanged(object sender, AC.AvalonControlsLibrary.Controls.RangeSelectionChangedEventArgs e)
{
if (e.NewRangeStart > e.NewRangeStop)
{
chnSlider.RangeStartSelected = e.NewRangeStop;
chnSlider.RangeStopSelected = e.NewRangeStart;
}
if (lc != null)
{
lc.Content = chnSlider.RangeStartSelected.ToString();
hc.Content = chnSlider.RangeStopSelected.ToString();
}
}
开发者ID:nicolailinhares,项目名称:multidata_acq,代码行数:14,代码来源:BoardConfig.xaml.cs
示例11: GetPointsArray
public override Vector3[] GetPointsArray(Vector3 startPosition, Vector3 targetPosition, AC.Char _char = null)
{
NavMeshHit hit = new NavMeshHit();
NavMeshPath _path = new NavMeshPath();
if (!NavMesh.CalculatePath (startPosition, targetPosition, -1, _path))
{
// Could not find path with current vectors
float maxDistance = 0.001f;
for (maxDistance = 0.001f; maxDistance < 1f; maxDistance += 0.05f)
{
if (NavMesh.SamplePosition (startPosition, out hit, maxDistance, -1))
{
startPosition = hit.position;
break;
}
}
for (maxDistance = 0.001f; maxDistance < 1f; maxDistance += 0.05f)
{
if (NavMesh.SamplePosition (targetPosition, out hit, maxDistance, -1))
{
targetPosition = hit.position;
break;
}
}
NavMesh.CalculatePath (startPosition, targetPosition, -1, _path);
}
List<Vector3> pointArray = new List<Vector3>();
foreach (Vector3 corner in _path.corners)
{
pointArray.Add (corner);
}
if (pointArray.Count > 1 && pointArray[0].x == startPosition.x && pointArray[0].z == startPosition.z)
{
pointArray.RemoveAt (0);
}
else if (pointArray.Count == 0)
{
pointArray.Clear ();
pointArray.Add (targetPosition);
}
return (pointArray.ToArray ());
}
开发者ID:mcbodge,项目名称:eidolon,代码行数:48,代码来源:NavigationEngine_UnityNavigation.cs
示例12: ChangeButton
private void ChangeButton (AC.Button button)
{
if (button == null)
{
return;
}
if (changeType == ChangeType.Enable)
{
button.isDisabled = false;
}
else if (changeType == ChangeType.Disable)
{
button.isDisabled = true;
}
}
开发者ID:amutnick,项目名称:CrackTheCode_Repo,代码行数:16,代码来源:ActionInteraction.cs
示例13: OnMenuEnable
public static void OnMenuEnable(AC.Menu _menu)
{
// This function is called whenever a menu is enabled.
if (_menu.title == "Pause")
{
MenuElement saveButton = _menu.GetElementWithName ("SaveButton");
if (saveButton)
{
saveButton.isVisible = !PlayerMenus.IsSavingLocked ();
}
_menu.Recalculate ();
}
}
开发者ID:WastNotWantNot,项目名称:WasteNotWantNot,代码行数:16,代码来源:MenuSystem.cs
示例14: AddElement
private void AddElement(string className, AC.Menu _menu)
{
Undo.RecordObject (_menu, "Add element");
List<int> idArray = new List<int>();
foreach (MenuElement _element in _menu.elements)
{
if (_element != null)
{
idArray.Add (_element.ID);
}
}
idArray.Sort ();
className = "Menu" + className;
MenuElement newElement = (MenuElement) CreateInstance (className);
newElement.Declare ();
newElement.title = className.Substring (4);
// Update id based on array
foreach (int _id in idArray.ToArray())
{
if (newElement.ID == _id)
{
newElement.ID ++;
}
}
_menu.elements.Add (newElement);
if (!Application.isPlaying)
{
_menu.Recalculate ();
}
DeactivateAllElements (_menu);
newElement.isEditing = true;
selectedMenuElement = newElement;
newElement.hideFlags = HideFlags.HideInHierarchy;
AssetDatabase.AddObjectToAsset (newElement, this);
AssetDatabase.ImportAsset (AssetDatabase.GetAssetPath (newElement));
AssetDatabase.SaveAssets ();
CleanUpAsset ();
}
开发者ID:mcbodge,项目名称:eidolon,代码行数:45,代码来源:MenuManager.cs
示例15: GetPointsArray
public override Vector3[] GetPointsArray(AC.Char _char, Vector3 _originPos, Vector3 _targetPos)
{
PolygonCollider2D poly = KickStarter.sceneSettings.navMesh.transform.GetComponent <PolygonCollider2D>();
bool changesMade = KickStarter.sceneSettings.navMesh.AddCharHoles (_char);
List<Vector3> pointsList3D = new List<Vector3> ();
if (IsLineClear (_originPos, _targetPos))
{
pointsList3D.Add (_targetPos);
//ResetHoles (KickStarter.sceneSettings.navMesh, changesMade);
return pointsList3D.ToArray ();
}
Vector2[] pointsList = CreateVertexArray (poly);
Vector2 originPos = GetNearestToMesh (_originPos, poly);
Vector2 targetPos = GetNearestToMesh (_targetPos, poly);
pointsList = AddEndsToList (pointsList, originPos, targetPos);
float[,] weight = pointsToWeight (pointsList);
int[] precede = buildSpanningTree (0, 1, weight);
if (precede == null)
{
Debug.LogWarning ("Pathfinding error");
pointsList3D.Add (_targetPos);
return pointsList3D.ToArray ();
}
int[] _path = getShortestPath (0, 1, precede);
foreach (int i in _path)
{
Vector3 vertex = new Vector3 (pointsList[i].x, pointsList[i].y, _originPos.z);
pointsList3D.Insert (0, vertex);
}
if (pointsList3D[0] == _originPos || (pointsList3D[0].x == originPos.x && pointsList3D[0].y == originPos.y))
{
pointsList3D.RemoveAt (0); // Remove origin point from start
}
ResetHoles (KickStarter.sceneSettings.navMesh, changesMade);
return pointsList3D.ToArray ();
}
开发者ID:IJkeB,项目名称:Ekster_Final,代码行数:45,代码来源:NavigationEngine_PolygonCollider.cs
示例16: Play
/*
* <summary>Plays a FaceFX animation on a character, based on an AudioClip.</summary>
* <param name = "speaker">The speaking character</param>
* <param name = "name">The unique identifier of the line in the format Joe13, where 'Joe' is the name of the character, and '13' is the ID number of ths speech line</param>
* <param name = "audioClip">The speech AudioClip</param>
*/
public static void Play(AC.Char speaker, string name, AudioClip audioClip)
{
#if FaceFXIsPresent
FaceFXControllerScript_Base fcs = speaker.GetComponent <FaceFXControllerScript_Base>();
if (fcs == null)
{
fcs = speaker.GetComponentInChildren <FaceFXControllerScript_Base>();
}
if (fcs != null)
{
speaker.isLipSyncing = true;
fcs.PlayAnim ("Default_" + name, audioClip);
}
else
{
Debug.LogError ("No FaceFXControllerScript_Base script found on " + speaker.gameObject.name);
}
#else
Debug.LogError ("The 'FaceFXIsPresent' preprocessor define must be declared in the Player Settings.");
#endif
}
开发者ID:farreltr,项目名称:OneLastSunset,代码行数:27,代码来源:FaceFXIntegration.cs
示例17: SharedGUIOne
protected void SharedGUIOne(AC.Char _target)
{
if (_target.animEngine == null || !_target.animEngine.ToString ().Contains (_target.animationEngine.ToString ()))
{
_target.ResetAnimationEngine ();
}
EditorGUILayout.BeginVertical ("Button");
EditorGUILayout.LabelField ("Animation settings:", EditorStyles.boldLabel);
_target.animationEngine = (AnimationEngine) EditorGUILayout.EnumPopup ("Animation engine:", _target.animationEngine);
if (_target.animationEngine == AnimationEngine.Sprites2DToolkit && !tk2DIntegration.IsDefinePresent ())
{
EditorGUILayout.HelpBox ("The 'tk2DIsPresent' preprocessor define must be declared in the\ntk2DIntegration.cs script. Please open it and follow instructions.", MessageType.Warning);
}
if (_target.animationEngine == AnimationEngine.Custom)
{
_target.customAnimationClass = EditorGUILayout.TextField ("Script name:", _target.customAnimationClass);
_target.motionControl = (MotionControl) EditorGUILayout.EnumPopup ("Motion control:", _target.motionControl);
}
EditorGUILayout.EndVertical ();
_target.animEngine.CharSettingsGUI ();
EditorGUILayout.BeginVertical ("Button");
EditorGUILayout.LabelField ("Movement settings:", EditorStyles.boldLabel);
if (_target.GetMotionControl () == MotionControl.Automatic)
{
_target.walkSpeedScale = EditorGUILayout.FloatField ("Walk speed scale:", _target.walkSpeedScale);
_target.runSpeedScale = EditorGUILayout.FloatField ("Run speed scale:", _target.runSpeedScale);
_target.acceleration = EditorGUILayout.FloatField ("Acceleration:", _target.acceleration);
_target.deceleration = EditorGUILayout.FloatField ("Deceleration:", _target.deceleration);
}
if (_target.GetMotionControl () != MotionControl.Manual)
{
_target.turnSpeed = EditorGUILayout.FloatField ("Turn speed:", _target.turnSpeed);
}
_target.turnBeforeWalking = EditorGUILayout.Toggle ("Turn before walking?", _target.turnBeforeWalking);
EditorGUILayout.EndVertical ();
}
开发者ID:IJkeB,项目名称:Ekster_Final,代码行数:40,代码来源:CharEditor.cs
示例18: Main
static void Main(string[] args)
{
// Existing stuff in the house
Light bedRoomLights = new Light();
AC acForTheHouse = new AC();
// CREATE the On cmd
LightOn trunbedRoomLightsOn = new LightOn(bedRoomLights);
ACOn trunOnAC = new ACOn(acForTheHouse);
// CREATE the off cmd
LightOff trunbedRoomLightsOff = new LightOff(bedRoomLights);
ACOff trunOffAC = new ACOff(acForTheHouse);
// add the On / off to the Remote
RemoteController remote = new RemoteController();
remote.InsertNewOnCommand(trunbedRoomLightsOn);
remote.InsertNewOnCommand(trunOnAC);
remote.InsertNewOffCommand(trunbedRoomLightsOff);
remote.InsertNewOffCommand(trunOffAC);
// turn on the Light and AC
remote.PressButonOn(0);
remote.PressButonOn(1);
// turn off both
remote.PressButonOff(0);
remote.PressButonOff(1);
}
开发者ID:AdrianNg,项目名称:DesignPatterns,代码行数:39,代码来源:Program.cs
示例19: CreateQRCode
private Image CreateQRCode(AC.Pattern pattern, int scale)
{
ZXing.BarcodeWriter writer = new ZXing.BarcodeWriter();
writer.Format = ZXing.BarcodeFormat.QR_CODE;
string data = new string(pattern.GetRawData().Select(b => Convert.ToChar(b)).ToArray());
ZXing.Common.BitMatrix matrix = writer.Encode(data);
Bitmap result = new Bitmap(matrix.Width * scale, matrix.Height * scale);
// This is probably better done with LockBits. Meh.
for (int x = 0; x < matrix.Height; x++)
for (int y = 0; y < matrix.Width; y++)
{
Color pixel = matrix[x, y] ? Color.Black : Color.White;
for (int i = 0; i < scale; i++)
for (int j = 0; j < scale; j++)
result.SetPixel(x * scale + i, y * scale + j, pixel);
}
return result;
}
开发者ID:jefff,项目名称:animalcrossingqr,代码行数:22,代码来源:QRDialog.cs
示例20: LoadUnityUI
/**
* <summary>Initialises the linked Unity UI GameObject.</summary>
* <param name = "_menu The element's parent Menu</param>
*/
public override void LoadUnityUI(AC.Menu _menu)
{
uiInput = LinkUIElement <InputField>();
}
开发者ID:farreltr,项目名称:OneLastSunset,代码行数:8,代码来源:MenuInput.cs
注:本文中的AC类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论