コード例 #1
0
    public override void NodeGUI()
    {
        GUILayout.Label("打字类型");
        tapType = (TapType)EditorGUILayout.EnumPopup(tapType);
        // Display Float connections
        GUILayout.BeginHorizontal();
        inputKnob.DisplayLayout();
        outputKnob.DisplayLayout();
        GUILayout.EndHorizontal();
        GUILayout.BeginVertical();

        scroll = EditorGUILayout.BeginScrollView(scroll, GUILayout.Height(80));
        EditorStyles.textField.wordWrap = false;
        DialogLine = EditorGUILayout.TextArea(DialogLine, GUILayout.ExpandHeight(true));
        EditorStyles.textField.wordWrap = false;
        EditorGUILayout.EndScrollView();
        GUILayout.EndVertical();

        /*
         * // Get adjacent flow elements
         * Node flowSource = flowIn.connected ()? flowIn.connections[0].body : null;
         * List<Node> flowTargets = flowOut.connections.Select ((ConnectionKnob input) => input.body).ToList ();
         *
         * // Display adjacent flow elements
         * GUILayout.Label ("Flow Source: " + (flowSource != null? flowSource.name : "null"));
         * GUILayout.Label ("Flow Targets:");
         * foreach (Node flowTarget in flowTargets)
         *      GUILayout.Label ("-> " + flowTarget.name);
         */
    }
コード例 #2
0
        private void AddTab(TapType type, string path = SettingsHandler.ROOT_FOLDER)
        {
            if (this._contextMenu == null)
            {
                CreateContextMenu();
            }

            IPage page;

            switch (type)
            {
            case TapType.EXPLORER:
                page = CreateExplorer(path);
                break;

            case TapType.SETTINGS:
                page = CreateSettings();
                break;

            case TapType.EMPTY:
                page = CreateEmpty();
                break;

            case TapType.THEME:
                page = CreateTheme();
                break;

            default: throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }

            AddTabToTabControl(CreateTabItem(page, type.ToString()));
        }
コード例 #3
0
ファイル: Part.cs プロジェクト: baguio/SSC-AI
 public static Movement TapTypeToMovement (TapType tap) {
     switch (tap) {
         case TapType.Force: return Movement.JustDown;
         case TapType.PassiveBegin: return Movement.JustDownOrStayDown;
         case TapType.PassiveStay: return Movement.StayDown;
         case TapType.PassiveEnd: return Movement.Relax;
     }
     throw new ArgumentException();
 }
コード例 #4
0
ファイル: Beat.cs プロジェクト: baguio/SSC-AI
 public List<int> getIndices (TapType tap_type) {
     List<int> result = new List<int>();
     for (int i = 0; i < notes.Count; ++i) {
         if (notes[i].tap == tap_type) {
             result.Add(i);
         }
     }
     return result;
 }
コード例 #5
0
ファイル: Beat.cs プロジェクト: baguio/SSC-AI
 public int getCount (TapType tap_type) {
     int result = 0;
     foreach (Note n in notes) {
         if (n.tap == tap_type) {
             ++result;
         }
     }
     return result;
 }
コード例 #6
0
    private void ShootRay(Ray shotRay, TapType type)
    {
        Debug.DrawRay(shotRay.origin, shotRay.direction, Color.red, 5);
        RaycastHit hit;//Info on the object the ray hit

        if (Physics.Raycast(shotRay.origin, shotRay.direction, out hit))
        {
            hit.transform.gameObject.GetComponent <BaseEnemy>().GetHit(damage, type);
        }
    }
コード例 #7
0
        static public bool IsSubstantial(this TapType item)
        {
            switch (item)
            {
            case TapType.LongTap:
            case TapType.ShortTap:
                return(true);
            }

            return(false);
        }
コード例 #8
0
    TaperGroup FindAGroup(TapType type)
    {
        if (m_TapGroup.ContainsKey(type))
        {
            int index = Random.Range(0, m_TapGroup [type].Count);
            return(m_TapGroup [type] [index]);
        }

        //CommonLogger.LogWarning (string.Format ("{0} has no {1} TapGroup", m_ModelObj.name, type.ToString ()));
        return(null);
    }
コード例 #9
0
        void InterpretButton(List <byte> buffer, out Button button, out TapType tapType)
        {
            char pressLen = (char)buffer.Take(buffer.Count() - 1).Last();

            if (buffer[0] == 'X')
            {
                if (buffer[1] == '1')
                {
                    button = Button.AUX1;
                }
                else if (buffer[1] == '2')
                {
                    button = Button.AUX2;
                }
                else if (buffer[1] == '3')
                {
                    button = Button.AUX3;
                }
                else
                {
                    throw new NotImplementedException($"Button X{(char)buffer[1]} not implemented");
                }
            }
            else if (buffer[0] == 'S' || buffer[0] == 'L' || buffer[0] == 'C')
            {
                button = Button.Knob;
            }
            else
            {
                throw new NotImplementedException($"Button {(char)buffer[0]} not implemented");
            }

            if (pressLen == 'S')
            {
                tapType = TapType.Single;
            }
            else if (pressLen == 'C')
            {
                tapType = TapType.Double;
            }
            else if (pressLen == 'L')
            {
                tapType = TapType.Long;
            }
            else
            {
                throw new NotImplementedException($"Tap type {(char)pressLen} not implemented");
            }
        }
コード例 #10
0
 /// <summary>
 /// Checks collision
 /// </summary>
 /// <param name="collision">The colliding object, plus other info</param>
 public override void GetHit(float damage, TapType type)
 {
     if (type == TapType.shortTap)
     {
         Vector3    temp       = Random.insideUnitCircle.normalized;
         Vector3    position   = transform.position + new Vector3(temp.x * 3, temp.y, 0);//sets position to a random spot near the original object
         GameObject tempObject = GameObject.Instantiate(gameObject, position, Quaternion.identity);
         tempObject.GetComponent <LongEnemy>().isClone = true;
         tempObject.transform.LookAt(Camera.main.transform);
     }
     else if (type == TapType.longTap)
     {
         base.TakeDamage(this.damage);
     }
 }
コード例 #11
0
    TaperGroup FindTapGroup(TapType type, int group_id)
    {
        if (!m_TapGroup.ContainsKey(type))
        {
            m_TapGroup [type] = new List <TaperGroup> ();
            return(null);
        }

        foreach (TaperGroup tg in m_TapGroup[type])
        {
            if (tg.Type == type && tg.Group == group_id)
            {
                return(tg);
            }
        }

        return(null);
    }
コード例 #12
0
 public bool GetMouseButtonUp(out TapType tapType)
 {
     tapType = TapType.None;
     if (!Input.GetMouseButtonUp(0))
     {
         return(false);
     }
     tapType = TapType.UI;
     if (IsTapUI())
     {
         return(true);
     }
     tapType = TapType.Stand;
     if (IsTapStand())
     {
         return(true);
     }
     tapType = TapType.Space;
     return(true);
 }
コード例 #13
0
ファイル: Note.cs プロジェクト: baguio/SSC-AI
 public Note (string name, TapType tap) {
     this.name = name;
     this.tap = tap;
 }
コード例 #14
0
 public virtual void Tap(WorldPress world_press, TapType type)
 {
 }
コード例 #15
0
ファイル: Beat.cs プロジェクト: baguio/SSC-AI
 public int getNotCount (TapType tap_type) {
     return notes.Count - getCount(tap_type);
 }
コード例 #16
0
 public TaperGroup(int group_id, TapType type)
 {
     this.Group = group_id;
     this.Type  = type;
 }
コード例 #17
0
ファイル: Beat.cs プロジェクト: baguio/SSC-AI
 public int indexOf (TapType tap_type) {
     for (int i = 0; i < notes.Count; ++i) {
         if (notes[i].tap == tap_type) { return i; }
     }
     return -1;
 }
コード例 #18
0
 /// <summary>
 /// Checks collision.  This enemy doesn't care what kind of tap hits it, so type is ignored
 /// </summary>
 /// <param name="collision">The colliding object, plus other info</param>
 public override void GetHit(float damage, TapType type)
 {
     base.TakeDamage(this.damage);
 }
コード例 #19
0
ファイル: Part.cs プロジェクト: baguio/SSC-AI
 public Part (TapType tap, Panel panel) :
     this(TapTypeToMovement(tap), panel) { }
コード例 #20
0
 public StreamTap(TapType type, string name, int delay, float sampleRate)
     : base(type, name, delay)
 {
     mSampleRateRatio = sampleRate;
 }
コード例 #21
0
 public Tap(TapType tapType, string name, int delay)
 {
     mType  = tapType;
     mName  = name;
     mDelay = delay;
 }
コード例 #22
0
 /// <summary>
 /// Checks collision
 /// </summary>
 /// <param name="collision">The colliding object, plus other info</param>
 abstract public void GetHit(float damage, TapType type);
コード例 #23
0
ファイル: Program.cs プロジェクト: M0LTE/flexcontrol.net
 static void ButtonPushHandler(Button which, TapType how)
 {
     Console.WriteLine($"{which} {how}");
 }
コード例 #24
0
ファイル: Beat.cs プロジェクト: baguio/SSC-AI
 public bool hasTapTypeOrNoneOnly (TapType tap_type) {
     foreach (Note n in notes) {
         if (n.tap != tap_type && n.tap != TapType.None) {
             return false;
         }
     }
     return true;
 }