Exemplo n.º 1
0
    /*
     * 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();
        }
    }
Exemplo n.º 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("");
        }
Exemplo n.º 3
0
 public AutoMouseEvent(Vector2 position, ClickEventType clickType, float delay)
 {
     this.clickType = clickType;
     this.delay     = delay;
     this.position  = position;
 }
Exemplo n.º 4
0
 /// <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;
 }
Exemplo n.º 5
0
 public ClickEvent(ClickEventType EventType, string EventArgument)
 {
     this.EventType = EventType; this.EventArgument = EventArgument;
 }