コード例 #1
0
ファイル: TurnBlockBase.cs プロジェクト: ukcat5503/Way
    /*
     * public void ClickObject(ClickEventType type){
     *      // (transform.name + "をクリック" + "  type: " + type).Log();
     *      clickAction(type);
     * }
     */

    virtual protected void clickAction(ClickEventType type)
    {
        if (!isAnimating && turnBlockType != BlockType.NotTurn && turnBlockType != BlockType.Place && !isTouchSphere)
        {
            TurnAngle turnBlockAngle;
            switch (type)
            {
            case ClickEventType.WheelUp:
                targetAngle    = -90f;
                leftRotate     = true;
                turnBlockAngle = TurnAngle.TurnLeft;
                break;

            case ClickEventType.WheelDown:
                targetAngle    = 90f;
                leftRotate     = false;
                turnBlockAngle = TurnAngle.TurnRight;
                break;

            default:
                return;
            }

            isAnimating = true;

            finalAngle     = currentAngle + targetAngle;
            finalViewAngle = transform.eulerAngles.y + targetAngle;

            TurnBlock((int)turnBlockAngle);
            Setup();
        }
    }
コード例 #2
0
        private static string getClickEventTypeName(ClickEventType type)
        {
            switch (type)
            {
            case ClickEventType.OpenUrl:
                return("open_url");

            case ClickEventType.RunCommand:
                return("run_command");

            case ClickEventType.SuggestCommand:
                return("suggest_command");

            case ClickEventType.ChangePage:
                return("change_page");
            }
            return("");
        }
コード例 #3
0
 public AutoMouseEvent(Vector2 position, ClickEventType clickType, float delay)
 {
     this.clickType = clickType;
     this.delay     = delay;
     this.position  = position;
 }
コード例 #4
0
ファイル: Chat.cs プロジェクト: Kingwl/MineCase
 /// <summary>
 /// Initializes a new instance of the <see cref="ChatClickEvent"/> class with the specified parameters.
 /// </summary>
 /// <param name="action">Action type</param>
 /// <param name="value">The value of action</param>
 public ChatClickEvent(ClickEventType action, JToken value)
 {
     Action = action;
     Value  = value;
 }
コード例 #5
0
 public ClickEvent(ClickEventType EventType, string EventArgument)
 {
     this.EventType = EventType; this.EventArgument = EventArgument;
 }