当前位置: 首页>>代码示例>>C#>>正文


C# AC类代码示例

本文整理汇总了C#中AC的典型用法代码示例。如果您正苦于以下问题:C# AC类的具体用法?C# AC怎么用?C# AC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AC类属于命名空间,在下文中一共展示了AC类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的AC类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。