This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Main() | |
| { | |
| var x = 1; | |
| Assign2ToValue(x); | |
| x.Dump(); | |
| OutAssign3ToValue(out x); | |
| x.Dump(); | |
| var y = new int[] { 4 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| // ReSharper disable InconsistentNaming | |
| ///<summary> | |
| /// wait until the animation finishes the <see cref="m_normalizedTime "/> part. | |
| /// </summary> | |
| /// <remarks> | |
| /// original code is http://tsubakit1.hateblo.jp/entry/2016/02/11/021743. The credit goes to him. | |
| /// </remarks> | |
| /// <example> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public override TaskStatus OnUpdate() | |
| { | |
| var playerTransform = GetComponent<EnemyStore>().playerTransform; | |
| var distanceFromPlayer = Vector3.Distance(playerTransform.position, transform.position); | |
| // slow down until speed becomes zero. | |
| if (distanceFromPlayer <= GlobalConst.maxRangeOfPlayerNear) | |
| { | |
| GetComponent<Animator>().applyRootMotion = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public class Trail : MonoBehaviour { | |
| ParticleSystem system; | |
| public Transform anchor; | |
| private Vector3 anchorPosition; | |
| private void Awake() | |
| { | |
| system = GetComponent<ParticleSystem>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Hi : Conditional | |
| { | |
| public override void OnTriggerEnter(Collider other) | |
| { | |
| Debug.Log("enter"); | |
| } | |
| public override TaskStatus OnUpdate() | |
| { | |
| return TaskStatus.Running; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Linq; | |
| using System.Reflection; | |
| using BehaviorDesigner.Runtime.Tasks; | |
| using UnityEngine; | |
| internal class DamageAction : Action | |
| { | |
| private Animator animator; | |
| private bool isCoroutineRunning; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using BehaviorDesigner.Runtime.Tasks; | |
| using UnityEngine; | |
| internal class AsyncAction : Action | |
| { | |
| private bool isCoroutineRunning; | |
| public override void OnStart() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Linq; | |
| using UnityEditor; | |
| using UnityEditor.Animations; | |
| using UnityEngine; | |
| namespace OnionMk2 | |
| { | |
| /// <summary> | |
| /// Load AnimationClip from Resources folder and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Text.RegularExpressions; | |
| using UnityEngine; | |
| namespace AnimatorLikeAnimation.Style5 | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using Newtonsoft.Json; | |
| using UnityEngine; | |
| public class UsingJsonDotNetInUnity : MonoBehaviour | |
| { | |
| private void Awake() | |
| { |