コード例 #1
0
ファイル: DetailInfo.cs プロジェクト: superhappy123/TripEBuy
 public DetailInfoA()
 {
     //
     // TODO: Add constructor logic here
     //
     this.actionResult = actionType.notAction;
     this.actionMessage = "not action";
 }
コード例 #2
0
 public void RecoilModifier(actionType ActType)
 {
     if (ActType == actionType.attach)
     {
         originalRecoil       = weapon.RecoilProfile;
         weapon.RecoilProfile = modifiedRecoil;
     }
     if (ActType == actionType.detach)
     {
         weapon.RecoilProfile = originalRecoil;
     }
 }
コード例 #3
0
 public ActionLC(actionType ty = actionType.meleDamageWS, float va = 1, int ti = 1, string s = "", string s2 = "", string s3 = "", bool isD = false, bool ust = true)
 {
     type         = ty;
     value        = va;
     trueTimes    = ti;
     trueValue    = va;
     times        = ti;
     spec         = s;
     spec2        = s2;
     spec3        = s3;
     isDead       = isD;
     unShowTarget = ust;
 }
コード例 #4
0
    private static UserActionStatus Validate(string user, actionType act)
    {
        List <User> users = new UserBLL().GetUsersByFilter(user.Trim(), null, 0, 1);

        if (users.Count > 0 && act == actionType.insert)
        {
            return(UserActionStatus.Duplicate);
        }
        else
        {
            return(UserActionStatus.Success);
        }
    }
コード例 #5
0
    private static ProjectActionStatus Validate(string Project, actionType act)
    {
        ProjectBLL     ProjectBLL = new ProjectBLL();
        List <Project> Projects   = ProjectBLL.GetProjectByFilter(Project.Trim());

        if (Projects.Count > 0 && act == actionType.insert)
        {
            return(ProjectActionStatus.Duplicate);
        }
        else
        {
            return(ProjectActionStatus.Success);
        }
    }
コード例 #6
0
 public void ChangeGrabPos(actionType ActType)
 {
     if (ActType == actionType.attach)
     {
         oldPoseOverride           = weapon.PoseOverride;
         weapon.PoseOverride       = NewPoseOverride;
         oldPoseOverrideTouch      = weapon.PoseOverride_Touch;
         weapon.PoseOverride_Touch = NewPoseOverrideTouch;
     }
     if (ActType == actionType.detach)
     {
         weapon.PoseOverride       = oldPoseOverride;
         weapon.PoseOverride_Touch = oldPoseOverrideTouch;
     }
 }
コード例 #7
0
 IEnumerator performAction(actionType actType)
 {
     Debug.Log ("Perform Action method called with type: " + actType.ToString ());
     // switch between two types of action
     if(actType == actionType.interact) {
         // while (actionInProgress)
         while(actionInProgress) {
             yield return null;
         }
     } else if (actType == actionType.move) {
         // while distance is not reached (for moveToPos methods)
         while(true) { //Vector3.Distance(
             yield return null;
         }
     }
 }
コード例 #8
0
    public void setType(actionType t)
    {
        type = t;
        switch (t)
        {
        case actionType.THROTTLE: GetComponent <Renderer>().material.color = Color.green;
            break;

        case actionType.BREAKS:
            GetComponent <Renderer>().material.color = Color.red;
            break;

        case actionType.CLUTCH:
            GetComponent <Renderer>().material.color = Color.yellow;
            break;
        }
    }
コード例 #9
0
    private static OrganismTypeActionStatus Validate(string organismType, actionType act)
    {
        OrganismTypeBLL     organismTypeBLL = new OrganismTypeBLL();
        List <OrganismType> organismTypes   = organismTypeBLL.GetOrganismTypeByFilter(organismType.Trim());

        if (organismTypes.Count > 0 && act == actionType.insert)
        {
            return(OrganismTypeActionStatus.Duplicate);
        }
        else if (organismTypes.Count > 0 && organismTypes[0].OrganismTypeName == organismType && act == actionType.update)
        {
            return(OrganismTypeActionStatus.Duplicate);
        }
        else
        {
            return(OrganismTypeActionStatus.Success);
        }
    }
コード例 #10
0
    private static ProjectActionStatus Validate(string scientificName, actionType act)
    {
        ProjectBLL     scientificNameBLL = new ProjectBLL();
        List <Project> scientificNames   = scientificNameBLL.GetProjectByFilter(scientificName.Trim());

        if (scientificNames.Count > 0 && act == actionType.insert)
        {
            return(ProjectActionStatus.Duplicate);
        }
        else if (scientificNames.Count > 0 && scientificNames[0].ProjectName == scientificName && act == actionType.update)
        {
            return(ProjectActionStatus.Duplicate);
        }
        else
        {
            return(ProjectActionStatus.Success);
        }
    }
コード例 #11
0
    private static GroupActionStatus Validate(string scientificName, actionType act)
    {
        GroupBLL     scientificNameBLL = new GroupBLL();
        List <Group> scientificNames   = scientificNameBLL.GetGroupByFilter(scientificName.Trim());

        if (scientificNames.Count > 0 && act == actionType.insert)
        {
            return(GroupActionStatus.Duplicate);
        }
        else if (scientificNames.Count > 0 && scientificNames[0].GroupName == scientificName && act == actionType.update)
        {
            return(GroupActionStatus.Duplicate);
        }
        else
        {
            return(GroupActionStatus.Success);
        }
    }
コード例 #12
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            if (action == actionType.ZoomWindow)
            {
                ZoomWindow((int)lastPoint.x, (int)(this.Height - lastPoint.y),
                           (int)curPoint.x, (int)(this.Height - curPoint.y));
            }

            action = actionType.None;

            Invalidate();

            Cursor = Cursors.Arrow;

            ((MainForm)this.Parent).StatusText("");

            base.OnMouseUp(e);
        }
コード例 #13
0
    private static ScientificNameActionStatus Validate(string scientificName, actionType act)
    {
        ScientificNameBLL     scientificNameBLL = new ScientificNameBLL();
        List <ScientificName> scientificNames   = scientificNameBLL.GetScientificNameByFilter(scientificName.Trim());

        if (scientificNames.Count > 0 && act == actionType.insert)
        {
            return(ScientificNameActionStatus.Duplicate);
        }
        else if (scientificNames.Count > 0 && scientificNames[0].ScientificNameDesc == scientificName && act == actionType.update)
        {
            return(ScientificNameActionStatus.Duplicate);
        }
        else
        {
            return(ScientificNameActionStatus.Success);
        }
    }
コード例 #14
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left && zoomWindowButtonDown)
            {
                action = actionType.ZoomWindow;

                curPoint.x  = e.X;
                curPoint.y  = e.Y;
                lastPoint.x = curPoint.x;
                lastPoint.y = curPoint.y;
            }

            else if ((e.Button == MouseButtons.Middle && (Control.ModifierKeys & Keys.Shift) == Keys.Shift) ||
                     zoomButtonDown)
            {
                action = actionType.Zoom;

                Cursor = zoomCursor;

                lastPoint.x = e.X;
                lastPoint.y = e.Y;
            }

            else if ((e.Button == MouseButtons.Middle && (Control.ModifierKeys & Keys.Control) == Keys.Control) ||
                     panButtonDown)
            {
                action = actionType.Pan;

                Cursor = panCursor;

                lastPoint.x = e.X;
                lastPoint.y = e.Y;
            }
            else if (e.Button == MouseButtons.Middle || rotateButtonDown)
            {
                action = actionType.Rotate;

                Cursor = rotateCursor;

                lastPoint = TrackBallMapping(e.X, e.Y, this.Width, this.Height);
            }

            base.OnMouseDown(e);
        }
コード例 #15
0
        public void HandleButtonClicked(object sender, EventArgs eventArgs)
        {
            //sender = fightButton;
            if (!fightValid)
            {
                fightValid       = true;
                playersTurn      = false;
                enemyTurn        = false;
                playersAnimation = true;
                enemyAnimation   = false;
                if (sender == fightButton)
                {
                    playersTurn       = true;
                    action            = actionType.ATTACK;
                    animationTexture  = fistAnimation;
                    animationPosition = enemyPos;
                    attackpts         = attackpts + 2;
                    punchSound.Play();

                    if (fistUpgrade == 1)
                    {
                        animationTexture = brassKnuckle;
                    }
                }
                else if (sender == itemButton)
                {
                    playersTurn       = true;
                    action            = actionType.HEAL;
                    animationTexture  = heartAnime;
                    animationPosition = playerPos;
                }
                else if (sender == specialButton)
                {
                    if (attackpts >= 20)
                    {
                        playersTurn       = true;
                        action            = actionType.SPECIAL;
                        animationTexture  = fireball;
                        animationPosition = enemyPos;
                    }
                }
            }
        }
コード例 #16
0
    /// <summery>
    /// It will create Notification on Activities table
    ///
    /// <typeparam name=""></typeparam> integer userID
    /// <typeparam name=""></typeparam> integer senderID   (the man who creates this alert)
    /// <typeparam name=""></typeparam> string  actionType : one of action types (const defined for this class)
    /// <typeparam name=""></typeparam> integer actionID   : related trade offer,  feedback ID
    /// </summery>
    function createNotification(userID, senderID, actionType, actionID)
    {
        //Check if this user will get this notification. (it will be set by Notification setting page)
        tradeUserIns = new TradeUser();
        userData     = tradeUserIns.getUserByID(userID);

        flagEnabled = 0; // user checked that he didn"t want to have this notification

        switch (actionType)
        {
        case Activity.ACTION_TYPE_OFFER_ACCEPTED:
            notificationType = Activity.NOTIFICATION_TYPE_OFFER_ACCEPTED;
            flagEnabled      = userData["optOfferAccepted"];
            break;

        case Activity.ACTION_TYPE_OFFER_RECEIVED:
            notificationType = Activity.NOTIFICATION_TYPE_OFFER_RECEIVED;
            flagEnabled      = userData["optOfferReceived"];
            break;

        case Activity.ACTION_TYPE_OFFER_DECLINED:
            notificationType = Activity.NOTIFICATION_TYPE_OFFER_DECLINED;
            flagEnabled      = userData["optOfferDeclined"];
            break;

        case Activity.ACTION_TYPE_FEEDBACK:
            notificationType = Activity.NOTIFICATION_TYPE_OFFER_FEEDBACK;
            flagEnabled      = userData["optFeedbackReceived"];
            break;
        }

        if (flagEnabled == 1)
        {
            //Create Notification.
            activityIns = new Activity();
            activityId  = activityIns.addActivity(userID, senderID, this.objectType, actionType, actionID);

            activityIns.addNotification(userID, activityId, notificationType);
        }
    }
コード例 #17
0
    /// <summary>
    /// Añade una Acción posible a los Estados existentes.
    /// </summary>
    /// <param name="state">Objeto que contiene el Estado</param>
    /// <param name="type">Selecciona el tipo de acción</param>
    /// <param name="action">Funcion que ejecuta.</param>
    public void AddAction(object state, actionType type, Action action)
    {
        int st = (int)state;

        switch (type)
        {
        case actionType.awake:
            _awakes[st].Add(action);
            break;

        case actionType.execute:
            _executes[st].Add(action);
            break;

        case actionType.sleep:
            _sleeps[st].Add(action);
            break;

        default:
            break;
        }
    }
コード例 #18
0
        /// <summary>
        /// Get a SchemaQueryType for quickly building a query to execute
        /// </summary>
        /// <param name="QueryName"></param>
        /// <param name="Action"></param>
        /// <param name="CommandName"></param>
        /// <returns></returns>
        public static SchemaQueryType Create(string QueryName, actionType CommandType, string CommandName, string CommandText = null)
        {
            var query = new ProjectFlx.Schema.SchemaQueryType();
            query.name = QueryName;
            query.command = new ProjectFlx.Schema.command();
            query.command.name.Text.Add(CommandName);
            query.command.action = CommandType;

            if (!String.IsNullOrEmpty(CommandText))
            {
                query.command.text = new mixedContent();
                query.command.text.Text = new List<string>();
                query.command.text.Text.Add(CommandText);
                query.command.type = new commandType();
                query.command.type = commandType.Select;
            }

            query.fields = new List<ProjectFlx.Schema.field>();
            query.parameters = new ProjectFlx.Schema.parameters();

            return query;
        }
コード例 #19
0
    /// <summery>
    /// It will create Notification on Activities table
    ///
    /// <typeparam name=""></typeparam> integer userID
    /// <typeparam name=""></typeparam> integer senderID   (the man who creates this alert)
    /// <typeparam name=""></typeparam> string  actionType : one of action types (const defined for this class)
    /// <typeparam name=""></typeparam> integer actionID   : related shop order ID
    /// </summery>
    function createNotification(userID, senderID, actionType, actionID)
    {
        //Check if this user will get this notification. (it will be set by Notification setting page)
        userIns  = new TradeUser();
        userData = userIns.getUserByID(userID);

        flagEnabled = 0; // user checked that he didn"t want to have this notification

        switch (actionType)
        {
        case Activity.ACTION_TYPE_PRODUCT_SOLD:
            flagEnabled = userData["optProductSoldOnShop"];
            break;
        }

        if (flagEnabled == 1)
        {
            //Create Notification.
            activityIns = new Activity();
            activityId  = activityIns.addActivity(userID, senderID, this.objectType, actionType, actionID);

            activityIns.addNotification(userID, activityId, Activity.NOTIFICATION_TYPE_PRODUCT_SOLD);
        }
    }
コード例 #20
0
    private static ProjectActionStatus Validate(string Project, actionType act)
    {
        ProjectBLL     ProjectBLL = new ProjectBLL();
        List <Project> Projects   = ProjectBLL.GetProjectByFilter(Project.Trim());

        if (Projects.Count > 0 && act == actionType.insert)
        {
            UserBLL userBLL = new UserBLL();
            Eisk.BusinessEntities.User user = userBLL.GetUserByUserName((HttpContext.Current.User.Identity).Name);

            foreach (var item in Projects)
            {
                if (item.Group_Projects.First().GroupID == user.Group_Users.First().GroupID)
                {
                    return(ProjectActionStatus.Duplicate);
                }
            }
            return(ProjectActionStatus.Success);
        }
        else
        {
            return(ProjectActionStatus.Success);
        }
    }
コード例 #21
0
 public Action(Texture2D _icon, Action.actionType _type)
 {
     icon = _icon;
     type = _type;
 }
コード例 #22
0
 public stateAction(System.Action<object> action, object state, string msg="")
 {
     this._action = action as object;
     this._param  = state;
     this.Message = msg;
     this.Type	 = actionType._parameter;
     this._hash	 = action.GetHashCode() + (state != null ? state.GetHashCode() : 0);
 }
コード例 #23
0
 public stateAction(System.Action action, string msg="")
 {
     this._action = action as object;
     this._param	 = null;
     this.Message = msg;
     this.Type 	 = actionType._void;
     this._hash	= action.GetHashCode();
 }
コード例 #24
0
        public void ActionPartition(actionType action, string partitionName, string partitionQuery = "", string partitionDatasource = "")
        {
            try
            {
                Server tabServer = new Server();
                tabServer.Connect(server);
                Database tabDatabase = tabServer.Databases.GetByName(this.database);

                Table tabTable = tabDatabase.Model.Tables.Find(this.table);

                switch (action)
                {
                case actionType.CREATE:
                    if (!tabTable.Partitions.ContainsName(partitionName))
                    {
                        Partition tabPartition = new Partition()
                        {
                            Name   = partitionName,
                            Source = new QueryPartitionSource()
                            {
                                DataSource = tabTable.Model.DataSources.Find(partitionDatasource),
                                Query      = partitionQuery
                            }
                        };

                        tabTable.Partitions.Add(tabPartition);
                        tabDatabase.Update(Microsoft.AnalysisServices.UpdateOptions.ExpandFull);
                    }
                    break;

                case actionType.DELETE:
                    if (tabTable.Partitions.ContainsName(partitionName))
                    {
                        tabTable.Partitions.Remove(partitionName);
                        tabDatabase.Update(Microsoft.AnalysisServices.UpdateOptions.ExpandFull);
                    }
                    break;

                case actionType.PROCESS:
                    if (tabTable.Partitions.ContainsName(partitionName))
                    {
                        Partition tabPartition = tabTable.Partitions.Find(partitionName);
                        tabPartition.RequestRefresh(RefreshType.Full);
                        tabDatabase.Update(Microsoft.AnalysisServices.UpdateOptions.ExpandFull);
                    }
                    break;

                default:
                    break;
                }

                tabServer.Disconnect();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception Raised from: " + ex.Source);
                Console.WriteLine("Error Message: " + ex.Message);
                Console.WriteLine("Stack Trace:" + ex.StackTrace);
                throw ex;
            }
        }
コード例 #25
0
ファイル: BasicZombie.cs プロジェクト: uomgamejam/OakNTom
    public void Update()
    {
        float left = transform.position.x;
        float top = transform.position.y;

        // If the mouse is held down anywhere onscreen and it's zombies' turn.
        if (Input.GetMouseButtonDown(0) && globals.teamTurn == globals.teams.Zombies)
        {
            // Check if mouseclick is within 3 by 3 grid surrounding this zombie's tile.
            Rect tempRect = new Rect(left - globals.tileWidth, top + globals.tileHeight, globals.tileWidth * 3, globals.tileHeight * 3);
            if (tempRect.Contains(Input.mousePosition))
            {
                // Check if the centre tile is clicked.
                tempRect = new Rect(left, top, globals.tileWidth, globals.tileHeight);
                if	(tempRect.Contains(Input.mousePosition))
                {
                    action = actionType.None;
                    if (!isActive)
                    {
                        if (globals.activePerson != null)
                            if (globals.activePerson.GetComponent<BasicZombie>() != null)
                                globals.activePerson.GetComponent<BasicZombie>().isActive = false;
                            else if (globals.activePerson.GetComponent<BasicHuman>() != null)
                                globals.activePerson.GetComponent<BasicHuman>().isActive = false;
                        globals.activePerson = GetComponent<OTAnimatingSprite>();
                        isActive = true;
                    }
                }
                else if (isActive)
                {
                    tempRect = new Rect(left-globals.tileWidth, top + globals.tileHeight, globals.tileWidth, globals.tileHeight);
                    Rect tempRect1 = new Rect(left, top + globals.tileHeight, globals.tileWidth, globals.tileHeight);
                    Rect tempRect2 = new Rect(left + globals.tileWidth, top + globals.tileHeight, globals.tileWidth, globals.tileHeight);
                    Rect tempRect3 = new Rect(left + globals.tileWidth, top, globals.tileWidth, globals.tileHeight);
                    Rect tempRect4 = new Rect(left + globals.tileWidth, top - globals.tileHeight, globals.tileWidth, globals.tileHeight);
                    Rect tempRect5 = new Rect(left, top-globals.tileHeight, globals.tileWidth, globals.tileHeight);
                    Rect tempRect6 = new Rect(left - globals.tileWidth, top - globals.tileHeight, globals.tileWidth, globals.tileHeight);
                    Rect tempRect7 = new Rect(left - globals.tileWidth, top + globals.tileHeight, globals.tileWidth, globals.tileHeight);
         					// Check if mouseclick is in 8 adjacent tiles.
                    if (tempRect.Contains(Input.mousePosition))
                        if (currentDirection == globals.direction.TopLeft)
                            action = actionType.Move;
                        else
                        {
                            action = actionType.Turn;
                          	newDirection = globals.direction.TopLeft;
                        }
                    else if	(tempRect1.Contains(Input.mousePosition))
                        if (currentDirection == globals.direction.Top)
                            action = actionType.Move;
                        else
                        {
                            action = actionType.Turn;
                          	newDirection = globals.direction.Top;
                        }
                    else if	(tempRect2.Contains(Input.mousePosition))
                        if (currentDirection == globals.direction.TopRight)
                            action = actionType.Move;
                        else
                        {
                            action = actionType.Turn;
                          	newDirection = globals.direction.TopRight;
                        }
                    else if	(tempRect3.Contains(Input.mousePosition))
                        if (currentDirection == globals.direction.Right)
                            action = actionType.Move;
                        else
                        {
                            action = actionType.Turn;
                          	newDirection = globals.direction.Right;
                        }
                    else if	(tempRect4.Contains(Input.mousePosition))
                        if (currentDirection == globals.direction.BottomRight)
                            action = actionType.Move;
                        else
                        {
                            action = actionType.Turn;
                          	newDirection = globals.direction.BottomRight;
                        }
                    else if	(tempRect5.Contains(Input.mousePosition))
                        if (currentDirection == globals.direction.Bottom)
                            action = actionType.Move;
                        else
                        {
                            action = actionType.Turn;
                          	newDirection = globals.direction.Bottom;
                        }
                    else if	(tempRect6.Contains(Input.mousePosition))
                        if (currentDirection == globals.direction.BottomLeft)
                            action = actionType.Move;
                        else
                        {
                            action = actionType.Turn;
                          	newDirection = globals.direction.BottomLeft;
                        }
                    else if (tempRect7.Contains(Input.mousePosition))
                        if (currentDirection == globals.direction.Left)
                            action = actionType.Move;
                        else
                        {
                            action = actionType.Turn;
                          	newDirection = globals.direction.Left;
                        }
                }
            }
        }
    }
コード例 #26
0
 public virtual bool setTimeQtyRecord(actionType __action)
 {
     throw new NotImplementedException();
 }
コード例 #27
0
 public MovilizerAnswer() {
     this.columnSizeTypeField = answerColumnSizeType.equal;
     this.groupIdField = ((sbyte)(-1));
     this.colIndexField = ((sbyte)(-1));
     this.colWidthField = ((sbyte)(0));
     this.colSortDescField = false;
     this.colSearchableField = true;
     this.actionField = actionType.NONE;
     this.triggerScreenValueChangedEventField = false;
     this.timerBasedScreenValueChangedEventField = false;
     this.dummyAnswerField = false;
     this.sortAnswerItemsByClientKeyField = false;
     this.portalMayDeleteField = true;
     this.portalMayEditField = true;
     this.portalMayMoveField = true;
 }
コード例 #28
0
    private static OrganismActionStatus Validate(string commonName, string scientificName, int organismTypeID, actionType act)
    {
        OrganismBLL organismBLL = new OrganismBLL();

        Organism organismCommonName = organismBLL.GetOrganismByScientificName(scientificName.Trim());

        if (organismCommonName != null)
        {
            if (organismCommonName.ScientificName.Trim() == scientificName.Trim() && act == actionType.insert)
            {
                return(OrganismActionStatus.DuplicateScientificName);
            }
            else if (organismCommonName.CommonName.Trim() == commonName.Trim() && organismCommonName.ScientificName.Trim() == scientificName.Trim() && organismCommonName.OrganismTypeID == organismTypeID)
            {
                return(OrganismActionStatus.DuplicateCommonName);
            }
            else
            {
                return(OrganismActionStatus.Success);
            }
        }
        else
        {
            return(OrganismActionStatus.Success);
        }
    }
コード例 #29
0
        public void BoltSpeedModifier(actionType ActType)
        {
            int wepType = 0;
            OpenBoltReceiver _OpenBoltWep   = null;
            ClosedBoltWeapon _ClosedBoltWep = null;
            Handgun          _HandgunWep    = null;
            TubeFedShotgun   _TFWep         = null;

            if (weapon is OpenBoltReceiver)
            {
                _OpenBoltWep = weapon as OpenBoltReceiver;
                wepType      = 1;
            }
            else if (weapon is ClosedBoltWeapon)
            {
                _ClosedBoltWep = weapon as ClosedBoltWeapon;
                wepType        = 2;
            }
            else if (weapon is Handgun)
            {
                _HandgunWep = weapon as Handgun;
                wepType     = 3;
            }
            else if (weapon is TubeFedShotgun)
            {
                _TFWep  = weapon as TubeFedShotgun;
                wepType = 4;
            }

            float _boltSpeedBack       = 0;
            float _boltSpeedForward    = 0;
            float _boltSpringStiffness = 0;

            switch (wepType)
            {
            case 1:
                _boltSpeedBack       = _OpenBoltWep.Bolt.BoltSpeed_Rearward;
                _boltSpeedForward    = _OpenBoltWep.Bolt.BoltSpeed_Forward;
                _boltSpringStiffness = _OpenBoltWep.Bolt.BoltSpringStiffness;
                break;

            case 2:
                _boltSpeedBack       = _ClosedBoltWep.Bolt.Speed_Rearward;
                _boltSpeedForward    = _ClosedBoltWep.Bolt.Speed_Forward;
                _boltSpringStiffness = _ClosedBoltWep.Bolt.SpringStiffness;
                break;

            case 3:
                _boltSpeedBack       = _HandgunWep.Slide.Speed_Forward;
                _boltSpeedForward    = _HandgunWep.Slide.Speed_Rearward;
                _boltSpringStiffness = _HandgunWep.Slide.SpringStiffness;
                break;
            }

            if (ActType == actionType.attach)
            {
                prevBoltSpeedBackwards  = _boltSpeedBack;
                prevBoltSpeedForward    = _boltSpeedForward;
                prevBoltSpringStiffness = _boltSpringStiffness;

                if (BoltSpeedModifierType == CapType.SetTo)
                {
                    _boltSpeedBack       = BoltSpeedBackwards;
                    _boltSpeedForward    = BoltSpeedForward;
                    _boltSpringStiffness = BoltSpringStiffness;
                }
                if (BoltSpeedModifierType == CapType.AddTo)
                {
                    _boltSpeedBack       += BoltSpeedBackwards;
                    _boltSpeedForward    += BoltSpeedForward;
                    _boltSpringStiffness += BoltSpringStiffness;
                }
            }
            if (ActType == actionType.detach)
            {
                _boltSpeedBack       = prevBoltSpeedBackwards;
                _boltSpeedForward    = prevBoltSpeedForward;
                _boltSpringStiffness = prevBoltSpringStiffness;
            }

            if (ChangesBoltSpeedRearward)
            {
                switch (wepType)
                {
                case 1:
                    _OpenBoltWep.Bolt.BoltSpeed_Rearward = _boltSpeedBack;
                    break;

                case 2:
                    _ClosedBoltWep.Bolt.Speed_Rearward = _boltSpeedBack;
                    break;

                case 3:
                    _HandgunWep.Slide.Speed_Forward = _boltSpeedBack;
                    break;
                }
            }
            if (ChangesBoltSpeedForward)
            {
                switch (wepType)
                {
                case 1:
                    _OpenBoltWep.Bolt.BoltSpeed_Forward = _boltSpeedForward;
                    break;

                case 2:
                    _ClosedBoltWep.Bolt.Speed_Forward = _boltSpeedForward;
                    break;

                case 3:
                    _HandgunWep.Slide.Speed_Rearward = _boltSpeedForward;
                    break;
                }
            }
            if (ChangesBoltSpeedStiffness)
            {
                switch (wepType)
                {
                case 1:
                    _OpenBoltWep.Bolt.BoltSpringStiffness = _boltSpringStiffness;
                    break;

                case 2:
                    _ClosedBoltWep.Bolt.SpringStiffness = _boltSpringStiffness;
                    break;

                case 3:
                    _HandgunWep.Slide.SpringStiffness = _boltSpringStiffness;
                    break;
                }
            }
        }
コード例 #30
0
 public Action(Texture2D _icon, Action.actionType _type, string _tooltip)
 {
     icon    = _icon;
     type    = _type;
     tooltip = _tooltip;
 }
コード例 #31
0
ファイル: ProjectFlxSqlExt.cs プロジェクト: kstubs/ProjFlx
        /// <summary>
        /// Get a SchemaQueryType for quickly building a query to execute
        /// </summary>
        /// <param name="QueryName"></param>
        /// <param name="Action"></param>
        /// <param name="CommandName"></param>
        /// <returns></returns>
        public static SchemaQueryType Create(string QueryName, actionType CommandType, string CommandName, string CommandText = null)
        {
            var query = new ProjectFlx.Schema.SchemaQueryType();
            query.name = QueryName;
            query.command = new ProjectFlx.Schema.command();
            query.command.name.Text.Add(CommandName);
            query.command.action = CommandType;

            if (!String.IsNullOrEmpty(CommandText))
            {
                query.command.text = new mixedContent();
                query.command.text.Text = new List<string>();
                query.command.text.Text.Add(CommandText);
                query.command.type = new commandType();
                query.command.type = commandType.Select;
            }

            query.fields = new List<ProjectFlx.Schema.field>();
            query.parameters = new ProjectFlx.Schema.parameters();

            return query;
        }
コード例 #32
0
	public void InitFrom(ScriptedActionInfo info){
		// 	initialize members from deserialized info
		gameObject.name = info.unityObjectName;
		
		comment = info.comment;
		objectName = info.objectName;
		type = info.type;
		role = info.role; // in a multi-role script, which role performs this action
		stringParam = info.stringParam;  // used for a lot of different things
//info.audioClipName = sa.audioClipName;
		fadeLength = info.fadeLength; // also used for wait, move
		desiredAlpha = info.desiredAlpha;
		desiredColor = info.desiredColor;
//	public Texture2Dname texture2D = null; // used for enableInteraction;
//	public Transform moveTo;
		moveToName = info.moveToName;
		offset = info.offset; // offset from transform for move, in transform's reference frame
		orientation = info.orientation;
//		if (info.scriptToExecuteName != null && info.scriptToExecuteName){
			// this probably need a redesign, where the search occurs at Start() time, since the script
//			info.scriptToExecuteName = scriptToExecute.name;
//		}
		ease = info.ease;
		negate = info.negate; // use to turn enable to disable, stop audio, etc.
		loop = info.loop;
		waitForCompletion = info.waitForCompletion; // signal complete after audio, fade, etc.
		sequenceEnd = info.sequenceEnd;
		executeOnlyOnce = info.executeOnlyOnce;
		block = info.block;
		dialogIfThen = info.dialogIfThen;
		breakpoint = info.breakpoint;
		preAttributes = info.preAttributes; // processed when the line is begun
		postAttributes = info.postAttributes; // processed when the line completes
		stringParam2 = info.stringParam2;
		stringParam3 = info.stringParam3;
		stringParam4 = info.stringParam4;
		attachmentOverride = info.attachmentOverride;
		eventScript = info.eventScript;
		voiceTag = info.voiceTag;	
		heading = info.heading;
		speed = info.speed;
		
		if (info.gameMsgFormInfo != null){
			gameMsgForm = gameObject.AddComponent<GameMsgForm>();
			gameMsgForm.InitFrom(info.gameMsgFormInfo);
			
//			info.gameMsg = sa.gameMsgForm.ToGameMsg(this); // how to handle message subclasses ?
			if (info.map != null){
				gameMsgForm.map = gameObject.AddComponent<InteractionMapForm>();
				gameMsgForm.map.InitFromMap(info.map);
			}
		}
		syncToTasksIndex = info.syncToTasksIndex;
		if (syncToTasksIndex != null)
			syncToTasks = new ScriptedAction[syncToTasksIndex.Length]; // will init when script is fully loaded.
		else
			syncToTasks = new ScriptedAction[0];
	}
コード例 #33
0
 internal log(int pieceX, int pieceY, boardType state, boardType lastState, actionType action, int count)
 {
     this.pieceX    = pieceX;
     this.pieceY    = pieceY;
     this.state     = state;
     this.lastState = lastState;
     this.action    = action;
     this.count     = count;
 }
コード例 #34
0
 public MovilizerAnswer() {
     this.columnSizeTypeField = answerColumnSizeType.EQUAL;
     this.groupIdField = ((sbyte)(-1));
     this.colIndexField = ((sbyte)(-1));
     this.colWidthField = ((sbyte)(-1));
     this.colSortDescField = false;
     this.colSearchableField = true;
     this.colSortableField = true;
     this.actionField = actionType.NONE;
     this.connectionTimeoutField = -1;
     this.readTimeoutField = -1;
     this.triggerScreenValueChangedEventField = false;
     this.timerBasedScreenValueChangedEventField = false;
     this.dummyAnswerField = false;
     this.sortAnswerItemsByClientKeyField = false;
 }
コード例 #35
0
ファイル: MainForm.cs プロジェクト: pgaufillet/MeosReplay
        private void senderBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            while (!senderBackgroundWorker.CancellationPending)
            {
                object[] oo;
                if (_actionToDo.TryDequeue(out oo))
                {
                    try
                    {
                        // just do it
                        actionType _action = (actionType)oo[0];
                        switch (_action)
                        {
                        case actionType.eCard:
                        {
                            // récupération des paramètres
                            int     cardno = (int)oo[1];
                            Punches p      = oo[2] as Punches;
                            int     zt     = (int)oo[3];
                            string  info   = oo[4] as string;

                            // petite attente
                            Thread.Sleep(1000 * finishToReadOut_base + _rand.Next(1000 * finishToReadOut_random));

                            // et envoi des données
                            if (_sender != null)
                            {
                                _sender.sendCard(cardno, p, zt);
                            }

                            // notification qu'il y a eu une action
                            senderBackgroundWorker.ReportProgress(0, info);
                        }
                        break;

                        case actionType.ePunch:
                        {
                            // récupération des paramètres
                            int    poste    = (int)oo[1];
                            int    cardno   = (int)oo[2];
                            int    timeCode = (int)oo[3];
                            string info     = oo[4] as string;

                            // petite attente
                            Thread.Sleep(1000 * radioTransmitTime_base + _rand.Next(1000 * radioTransmitTime_random));

                            // et envoi des données
                            if (_sender != null)
                            {
                                _sender.sendPunch(poste, cardno, timeCode);
                            }

                            // notification qu'il y a eu une action
                            senderBackgroundWorker.ReportProgress(0, info);
                        }
                        break;
                        }
                    }
                    catch (Exception ex)
                    {
                        senderBackgroundWorker.ReportProgress(0, ex.Message);
                    }
                }
                else
                {
                    Thread.Sleep(500);
                }
            }
        }
コード例 #36
0
    private static CommonNameActionStatus Validate(string commonName, string scientificName, actionType act)
    {
        User user = new UserBLL().GetUserByUserName((HttpContext.Current.User.Identity).Name);

        int groupID = new Group_UsersBLL().GetGroup_UsersByUserID(user.UserID)[0].GroupID;

        Organism organism = new OrganismBLL().GetOrganismByScientificNameCommonName(scientificName.Trim(), commonName.Trim());

        if (organism != null && organism.GroupID == groupID)
        {
            if (act == actionType.insert)
            {
                return(CommonNameActionStatus.Duplicate);
            }
            else
            {
                return(CommonNameActionStatus.Success);
            }
        }
        else
        {
            return(CommonNameActionStatus.Success);
        }
    }
コード例 #37
0
 public virtual bool setPrescriberRecord(actionType __action)
 {
     throw new NotImplementedException();
 }
コード例 #38
0
ファイル: Reducer.cs プロジェクト: pwarner/Transmute.Net
 select(actionType, CreateReducer(actionType, method));
コード例 #39
0
ファイル: DualView.cs プロジェクト: GabeTesta/Warps
 public void StopSelect(actionType restore)
 {
     this[0].ActionMode = restore;
     this[1].ActionMode = restore;
 }
コード例 #40
0
	public void ShowInspectorGUI(string GUIlabel){  // should probably return the dirty bit from here...
		// lets extend this, to show only the fields required by the selected action type.  
		// that will make it a lot friendlier in the editor
		if (serializedObject == null) serializedObject = new SerializedObject(this);
		
		EditorGUI.BeginChangeCheck();
		type = (actionType)EditorGUILayout.EnumPopup("Action type",(System.Enum)type);
		
		if (type == actionType.enableInteraction){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToAffect",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			stringParam = EditorGUILayout.TextField("InteractionTAG",stringParam);// used for a lot of different things
			negate = EditorGUILayout.Toggle("disable",negate); // use to turn enable to disable, stop audio, etc.
			loop = EditorGUILayout.Toggle("append",loop);
			texture2D = (Texture2D)EditorGUILayout.ObjectField("iconTexture",texture2D,typeof(Texture2D),true);
			ease = EditorGUILayout.Toggle("remove icon",ease); // hackfully abuse this boolean
		}
		if (type == actionType.playAudio){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToPlay",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("MappedSoundName",stringParam);// used for a lot of different things
			audioClip = (AudioClip)EditorGUILayout.ObjectField("audioClip",audioClip,typeof(AudioClip),true);
			fadeLength = EditorGUILayout.FloatField("delay After",fadeLength);
			if (stringParam2 == null) stringParam2 = "";
			stringParam2 = EditorGUILayout.TextField("LookAt",stringParam2);
//			fadeLength = EditorGUILayout.FloatField("fadeLength",fadeLength); // also used for wait, move
//			ease = EditorGUILayout.Toggle("ease",ease); // ease or linear movement/fade
			negate = EditorGUILayout.Toggle("stop",negate); // use to turn enable to disable, stop audio, etc.
			loop = EditorGUILayout.Toggle("loop",loop);
		}
		if (type == actionType.playAnimation){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToAnimate",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("animation",stringParam);// used for a lot of different things
			if (eventScript == null) eventScript = "";
			eventScript = EditorGUILayout.TextField("eventScript",eventScript);
//			fadeLength = EditorGUILayout.FloatField("fadeLength",fadeLength); // also used for wait, move
//			desiredAlpha = EditorGUILayout.FloatField("desiredAlpha",desiredAlpha);
			loop = EditorGUILayout.Toggle("loop",loop);
		}
		if (type == actionType.putMessage){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToAffect",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
					
			fadeLength = EditorGUILayout.FloatField("delay",fadeLength);
			
			// see about adding local gameMessage to use in this script
			if (gameMsgForm == null){
				gameMsgForm = gameObject.AddComponent<GameMsgForm>();//gameObject.AddComponent<GameMsgForm>();
				// could just do this when we know we'll need one...
				gameMsgForm.map = gameObject.AddComponent<InteractionMapForm>(); //gameObject.AddComponent<InteractionMapForm>();	

				EditorUtility.SetDirty(this);
			}
			else
			{
				if (gameMsgForm.ShowInspectorGUI())
					EditorUtility.SetDirty(this);
			}
			
			if (gameMsgForm.msgType==GameMsgForm.eMsgType.dialogMsg)
				dialogIfThen = EditorGUILayout.Toggle("Treat As If-Then-Else",dialogIfThen);
			
//			stringParam = EditorGUILayout.TextField("message tag",stringParam);// used for a lot of different things


		}
		if (type == actionType.move){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToMove",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			fadeLength = EditorGUILayout.FloatField("moveTime",fadeLength); // also used for wait, move
			moveTo = (Transform)EditorGUILayout.ObjectField("moveTo",moveTo,typeof(Transform),true);
			if (moveToName == null) moveToName = "";
			moveToName = EditorGUILayout.TextField("moveToName",moveToName);
			offset = EditorGUILayout.Vector3Field("offset",offset); // in moveTo reference frame
			ease = EditorGUILayout.Toggle("ease",ease); // ease or linear movement/fade
		}
		if (type == actionType.fade){			
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToAffect",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
//			stringParam = EditorGUILayout.TextField("stringParam",stringParam);// used for a lot of different things
			fadeLength = EditorGUILayout.FloatField("fadeLength",fadeLength); // also used for wait, move
			desiredAlpha = EditorGUILayout.FloatField("desiredAlpha",desiredAlpha);
			desiredColor = EditorGUILayout.ColorField("desiredColor",desiredColor);
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("New Matl or Mesh",stringParam);
			ease = EditorGUILayout.Toggle("ease",ease); // ease or linear movement/fade
		}
		if (type == actionType.ifThenElse){			
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToTest",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			if (stringParam == null) stringParam = "";
			stringParam = ValidateConditionalString("attribute conditional",stringParam);// used for a lot of different things
		}
		if (type == actionType.executeScript){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToExecute",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			scriptToExecute = (InteractionScript)EditorGUILayout.ObjectField("scriptToExecute",scriptToExecute,typeof(InteractionScript),true);
			if (scriptToExecute != null) stringParam2 = scriptToExecute.name;
			if (stringParam2 == null) stringParam2 = "";
			stringParam2 = EditorGUILayout.TextField("script name",stringParam2);
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("args",stringParam);// used for a lot of different things
			ease = EditorGUILayout.Toggle("pass args",ease); // reused boolean
		}
		if (type == actionType.queueScript){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToExecute",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			scriptToExecute = (InteractionScript)EditorGUILayout.ObjectField("scriptToExecute",scriptToExecute,typeof(InteractionScript),true);
			if (scriptToExecute != null) stringParam2 = scriptToExecute.name;
			if (stringParam2 == null) stringParam2 = "";
			stringParam2 = EditorGUILayout.TextField("script name",stringParam2);
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("args",stringParam);// used for a lot of different things
			ease = EditorGUILayout.Toggle("pass args",ease); // reused boolean
			loop = EditorGUILayout.Toggle("check to flush",loop); // reused boolean
			if (loop) stringParam2 = ""; //flush takes empty script
		}		
		
		if (type == actionType.wait){
			if (stringParam == null) stringParam = "";
			stringParam = ValidateConditionalString("wait Condition",stringParam);
			if (stringParam != "" && stringParam != null)
				fadeLength = EditorGUILayout.FloatField("Timeout Value",fadeLength);
			else
				fadeLength = EditorGUILayout.FloatField("wait Time",fadeLength); // also used for wait, move
			if (preAttributes!="" || postAttributes != "" || stringParam != ""){
				objectToAffect = (GameObject)EditorGUILayout.ObjectField("object for Attributes",objectToAffect,typeof(GameObject),true);
				if (objectName == null) objectName = "";
				objectName = EditorGUILayout.TextField("object Name for attributes",objectName);
			}
			loop = EditorGUILayout.Toggle("Hold Position",loop); // reused boolean
		}
		if (type == actionType.characterTask){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("characterToAffect",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("characterName",objectName);
			if (moveToName == null) moveToName = "";
			moveToName = EditorGUILayout.TextField("Position",moveToName);// used for a lot of different things
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("Posture",stringParam);
			if (stringParam2 == null) stringParam2 = "";
			stringParam2 = EditorGUILayout.TextField("LookAt",stringParam2);
			if (stringParam3 == null) stringParam3 = "";
			stringParam3 = EditorGUILayout.TextField("Animation",stringParam3);
			fadeLength = EditorGUILayout.FloatField("delay",fadeLength); 
			if (voiceTag == null) voiceTag = "";
			voiceTag = EditorGUILayout.TextField("voiceTag",voiceTag);
			if (stringParam4 == null) stringParam4 = "";
			stringParam4 = EditorGUILayout.TextField(":COMPLETE msg?",stringParam4);
			heading = EditorGUILayout.FloatField("Heading",heading);
			speed = EditorGUILayout.FloatField ("Speed",speed);
			if (attachmentOverride == null) attachmentOverride = "";
			attachmentOverride = EditorGUILayout.TextField("attachmentOverride",attachmentOverride);
			if (eventScript == null) eventScript = "";
			eventScript = EditorGUILayout.TextField("eventScript",eventScript);
// I had no idea how to write this, but thanks to Unity forums, here is a nice Array custom inspector!
	serializedObject.Update();
    EditorGUIUtility.LookLikeInspector();

    SerializedProperty myIterator = serializedObject.FindProperty("syncToTasks");
    while (true){
        Rect myRect = GUILayoutUtility.GetRect(0f, 16f);
        bool showChildren = EditorGUI.PropertyField(myRect, myIterator);
		if (!myIterator.NextVisible(showChildren)) break;
	}
    serializedObject.ApplyModifiedProperties()	;
				
	EditorGUIUtility.LookLikeControls();
// end of Thanks to the Forums for the code!				

		}
		if (type == actionType.attach){
			negate = EditorGUILayout.Toggle("check for DETACH",negate);
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToAffect",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			if (attachmentOverride == null) attachmentOverride = "";
			if (negate)
				attachmentOverride = EditorGUILayout.TextField("reparentOverride",attachmentOverride);
			else
				attachmentOverride = EditorGUILayout.TextField("target parent Override",attachmentOverride);
			offset = EditorGUILayout.Vector3Field("offset",offset);
			orientation = EditorGUILayout.Vector3Field("orientation",orientation);
			fadeLength = EditorGUILayout.FloatField("lerpTime",fadeLength);

//			stringParam = EditorGUILayout.TextField("parent name",stringParam);// used for a lot of different things
		}
		if (type == actionType.spawn){
			
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("SpawnLocationObject",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("LocationObjectName",objectName);
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("template",stringParam);// used for a lot of different things
			if (stringParam2 == null) stringParam2 = "";
			stringParam2 = EditorGUILayout.TextField("newName",stringParam2);
			if (stringParam3 == null) stringParam3 = "";
			stringParam3 = EditorGUILayout.TextField("newParent?",stringParam3);
//			loop = EditorGUILayout.Toggle("attach To Location?",loop);
			offset = EditorGUILayout.Vector3Field("attach offset",offset);
		}
		if (type == actionType.destroy){
			
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToAffect",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
		}
		if (type == actionType.unityMessage){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToAnimate",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("method",stringParam);// used for a lot of different things
			if (stringParam2 == null) stringParam2 = "";
			stringParam2 = EditorGUILayout.TextField("argumentString",stringParam2);// used for a lot of different things
		}
		if (type == actionType.lockPosition){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToLock",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("objectName",objectName);
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("lockScriptPriority",stringParam);// used for a lot of different things
			negate = EditorGUILayout.Toggle("check for UNLOCK",negate);			
		}
		if (type == actionType.goToLine){
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("abort or line#",stringParam);
			GUILayout.Label("BE CAREFUL WITH THOSE LINE NUMBERS!");
		}
		if (type == actionType.setIKTarget){
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("taskCharacter",objectToAffect,typeof(GameObject),true);
			if (objectName == null) objectName = "";
			objectName = EditorGUILayout.TextField("taskCharacterName",objectName);
			if (moveToName == null) moveToName = "";
			moveToName = EditorGUILayout.TextField("targetName",moveToName);// used for a lot of different things
			if (stringParam == null) stringParam = "";
			stringParam = EditorGUILayout.TextField("Left or Right",stringParam);
			fadeLength = EditorGUILayout.FloatField("blendTime",fadeLength);	
			offset = EditorGUILayout.Vector3Field("offset",offset);
			orientation = EditorGUILayout.Vector3Field("orientation",orientation);
			if (stringParam2 == null) stringParam2 = "0";
			stringParam2 = EditorGUILayout.TextField("Hold Time",stringParam2);
		}
		
		
		GUILayout.Space(10);
		if (comment == null) comment = "";
		comment = EditorGUILayout.TextField("comment",comment);
		if (preAttributes == null) preAttributes = "";
		preAttributes = EditorGUILayout.TextField("preAttributes",preAttributes); // set when line starts
		if (postAttributes == null) postAttributes = "";
		postAttributes = EditorGUILayout.TextField("postAttributes",postAttributes); // set when line completes
		block = (blockType)EditorGUILayout.EnumPopup("IfThenElse bracket",(System.Enum)block);
		SetNamePrefix(block);
		executeOnlyOnce = EditorGUILayout.Toggle("executeOnlyOnce",executeOnlyOnce);
		waitForCompletion = EditorGUILayout.Toggle("waitForCompletion",waitForCompletion);
		sequenceEnd = EditorGUILayout.Toggle("sequenceEnd",sequenceEnd);
		breakpoint = EditorGUILayout.Toggle("debug breakpoint",breakpoint);
		
		bool dirty = EditorGUI.EndChangeCheck();
		if (dirty){
			if (objectToAffect != null && objectName == ""){ // default, or we could try looking up the name again...
				objectName = objectToAffect.name;
			}
			if (moveTo != null && moveToName == ""){ // default, or we could try looking up the name again...
				moveToName = moveTo.name;
			}
			if (scriptToExecute != null && stringParam2 == ""){ // default, or we could try looking up the name again...
				stringParam2 = scriptToExecute.name;
			}
			
			EditorUtility.SetDirty(this);
		}
		
/*			cut and paste reference for new inspector types
 * 
			objectToAffect = (GameObject)EditorGUILayout.ObjectField("objectToAffect",objectToAffect,typeof(GameObject));
			objectName = EditorGUILayout.TextField("objectName",objectName);
			stringParam = EditorGUILayout.TextField("stringParam",stringParam);// used for a lot of different things
			audioClip = (AudioClip)EditorGUILayout.ObjectField("audioClip",audioClip,typeof(AudioClip));
			fadeLength = EditorGUILayout.FloatField("fadeLength",fadeLength); // also used for wait, move
			desiredAlpha = EditorGUILayout.FloatField("desiredAlpha",desiredAlpha);
			desiredColor = EditorGUILayout.ColorField("desiredColor",desiredColor);
			moveTo = (Transform)EditorGUILayout.ObjectField("moveTo",moveTo,typeof(Transform));
			ease = EditorGUILayout.Toggle("ease",ease); // ease or linear movement/fade
			negate = EditorGUILayout.Toggle("negate",negate); // use to turn enable to disable, stop audio, etc.
			loop = EditorGUILayout.Toggle("loop",loop);
			waitForCompletion = EditorGUILayout.Toggle("waitForCompletion",waitForCompletion);
			executeOnlyOnce = EditorGUILayout.Toggle("executeOnlyOnce",executeOnlyOnce);
			ifBranch = EditorGUILayout.TextField("ifBranch",ifBranch);
			elseBranch = EditorGUILayout.TextField("elseBranch",elseBranch);
*/
/*
		if (GUILayout.Button("SERIALIZE")){
//			ScriptedActionInfo info = ToInfo (this);
			ScriptedObject pop = this.transform.parent.parent.GetComponent<ScriptedObject>();
			ScriptedObject.ScriptedObjectInfo info = pop.ToInfo (pop);
			XmlSerializer serializer = new XmlSerializer(typeof(ScriptedObject.ScriptedObjectInfo));
 			FileStream stream = new FileStream("TESTSOSERIAL.xml", FileMode.Create);
 			serializer.Serialize(stream, info);
 			stream.Close();
		}
*/
		
	}
コード例 #41
0
ファイル: DualView.cs プロジェクト: GabeTesta/Warps
 internal void SetActionMode(actionType actionType)
 {
     ActiveView.ActionMode = actionType;
 }