Exemplo n.º 1
0
 public Chain SetupParallel(IEnumerator[] routines, MonoBehaviour player)
 {
     type                 = EType.Parallel;
     this.player          = player;
     this.parallelRoutine = routines;
     return(this);
 }
Exemplo n.º 2
0
        public void Do()
        {
            EType eType  = EType.DoNothing;
            int   typeId = 0;

            switch (typeId)
            {
            case 1:     //Basic
                eType = EType.Basic;
                break;

            case 2:     //Other
                eType = EType.Other;
                break;

            default:
                break;
            }

            if (eType != EType.DoNothing)
            {
                HandlerFactory  handlerFactory = new HandlerFactory();
                AbstractHandler handler        = null;
                handler = handlerFactory.getHandler(eType);
            }
        }
Exemplo n.º 3
0
 public Chain SetupNon(System.Action action, MonoBehaviour player)
 {
     type        = EType.NonCoroutine;
     this.player = player;
     this.action = action;
     return(this);
 }
Exemplo n.º 4
0
        } // end default constructor

        /// <summary>
        /// To initialize data members to given values
        /// </summary>
        /// <param name="empType">enum of type EType</param>
        /// <param name="empID">string</param>
        /// <param name="firstName">string</param>
        /// <param name="middle">string</param>
        /// <param name="lastName">string</param>
        /// <param name="marital">string</param>
        /// <param name="fPTime">string</param>
        /// <param name="department">string</param>
        /// <param name="title">string</param>
        /// <param name="startDate">DateTime</param>
        /// <param name="hourlyRate">double</param>
        public Hourly(EType empType, string empID, string firstName, string middle, string lastName, string marital, string fPTime,
            string department, string title, DateTime startDate, double hourlyRate)
            : base(empType, empID, firstName, middle, lastName, marital, fPTime, department, title, startDate)
        {
            HourlyRate = hourlyRate;
            HoursWorked = 0.0;
        } // end Parameterized constructor
Exemplo n.º 5
0
 public static bool IsPOD(EType t)
 {
     if (t == EType.UINT8)
     {
         return(true);
     }
     if (t == EType.UINT16)
     {
         return(true);
     }
     if (t == EType.UINT32)
     {
         return(true);
     }
     if (t == EType.UINT64)
     {
         return(true);
     }
     if (t == EType.INT8)
     {
         return(true);
     }
     if (t == EType.INT16)
     {
         return(true);
     }
     if (t == EType.INT32)
     {
         return(true);
     }
     if (t == EType.INT64)
     {
         return(true);
     }
     if (t == EType.FLOAT32)
     {
         return(true);
     }
     if (t == EType.FLOAT64)
     {
         return(true);
     }
     if (t == EType.STRING)
     {
         return(true);
     }
     if (t == EType.BOOLEAN)
     {
         return(true);
     }
     if (t == EType.SELECT)
     {
         return(true);
     }
     if (t == EType.BITFIELD)
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 6
0
        public static EDominator getDominator(Nakshatra m, Nakshatra n)
        {
            EType em = getType(m);
            EType en = getType(n);

            EType[] order = new EType[]
            {
                EType.IPeacock, EType.ICock, EType.ICrow, EType.IPingala
            };
            if (em == en)
            {
                return(EDominator.IEqual);
            }
            for (int i = 0; i < order.Length; i++)
            {
                if (em == order[i])
                {
                    return(EDominator.IMale);
                }
                if (en == order[i])
                {
                    return(EDominator.IFemale);
                }
            }
            return(EDominator.IEqual);
        }
Exemplo n.º 7
0
        protected SidedOperatorToken(EType output, EType leftSideType, EType rightSideType, Func <IHasOutput, IHasOutput, ActionTreeToken> dele) : base(output)
        {
            _leftSideType  = leftSideType;
            _rightSideType = rightSideType;

            _delegate = dele;
        }
Exemplo n.º 8
0
        public static int ETypePrior(EType type)
        {
            switch (type)
            {
            case EType.Abs:
            case EType.Exp:
            case EType.Log:
            case EType.Sin:
            case EType.Cos:
            case EType.Tan:
            case EType.Asin:
            case EType.Acos:
            case EType.Atan:
                return(1);

            case EType.Pow:
                return(2);

            case EType.Neg:
                return(3);

            case EType.Mul:
            case EType.Div:
                return(4);

            case EType.Add:
            case EType.Sub:
                return(5);

            default:
                return(0);
            }
        }
Exemplo n.º 9
0
    public Bullet AddBullet(Sprite sprite, EType type, EMaterial material, Color32 color, Vector3 position, Vector3 scale,
                            float speed = 0, float angle = 0, float acc = 0, float ang_vec = 0)
    {
        Bullet bullet = PullBullet(type, material);

        bullet.CopyData(sprite, type, material, color, position, scale, speed, angle, acc, ang_vec);

        if (type == EType.NIGHTMARE || type == EType.DREAM)
        {
            //bullet.Position.z = Layering.Bullet;
            StartCoroutine(bullet._Appear(0.5f));
        }

        // Update some of the bullet data
        if (sprite != null)
        {
            bullet.UVs    = sprite.rect;
            bullet.Bounds = sprite.bounds;
        }

        SetupBullet(bullet);

        // Add the bullet to active list
        bullet.Active = true;
        _active.Add(bullet);

        return(bullet);
    }
Exemplo n.º 10
0
        public static int getScore(Nakshatra m, Nakshatra f)
        {
            EType em = getType(m);
            EType ef = getType(f);

            if (em == ef)
            {
                return(2);
            }
            if (em == EType.IBrahmana &&
                (ef == EType.IKshatriya || ef == EType.IVaishya || ef == EType.ISudra))
            {
                return(1);
            }
            if (em == EType.IKshatriya &&
                (ef == EType.IVaishya || ef == EType.ISudra))
            {
                return(1);
            }
            if (em == EType.IVaishya && ef == EType.ISudra)
            {
                return(1);
            }
            if (em == EType.IAnuloma && ef != EType.IPratiloma)
            {
                return(1);
            }
            if (ef == EType.IAnuloma && em != EType.IAnuloma)
            {
                return(1);
            }
            return(0);
        }
Exemplo n.º 11
0
 public Chain SetupRoutine(IEnumerator routine, MonoBehaviour player)
 {
     type         = EType.Single;
     this.player  = player;
     this.routine = routine;
     return(this);
 }
Exemplo n.º 12
0
 private ESOSimpleTypeObject(ESOSimpleType type, EType?input, EType output, Func <dynamic, dynamic, dynamic> calc)
 {
     this.type   = type;
     this.calc   = calc;
     this.input  = input;
     this.output = output;
 }
Exemplo n.º 13
0
    private FetchedResourceRef RetainInternal(string url, EType type, bool threeD, bool streaming)
    {
        FetchedResourceRef fetchedres = FindFetchedRes(url);
        WWW fetchedWWW = FindFetchedWWW(url);

        if (fetchedres == null && fetchedWWW == null)
        {
            DebugUtil.Error("attempt to retain an unfetched resource, url: " + url);
            return(null);
        }
        else if (fetchedres != null)
        {
            fetchedres.AddRef();
            return(fetchedres);
        }
        else if (fetchedWWW != null)
        {
            FetchedResourceRef res = new FetchedResourceRef();
            res.type = type;
            res.SetObj(fetchedWWW, threeD, streaming);
            res.AddRef();
            fetchedResourceMap[url] = res;

            fetchedWWW.Dispose();
            fetchedWWWMap.Remove(url);

            return(res);
        }
        else //should never be here
        {
            throw new System.Exception("entering impossible code path");
        }
    }
Exemplo n.º 14
0
        /// <summary>
        /// Create and effect with the specified Force and Type
        /// </summary>
        /// <param name="force"></param>
        /// <param name="type"></param>
        public Effect(EForce effectForce, EType effectType)
            : this()
        {
            this.Force         = effectForce;
            this.Type          = effectType;
            this.Direction     = EDirection.North;
            this.TriggerButton = -1;
            this.ReplayLength  = INFINITE_TIME;
            this._handle       = -1;

            switch (effectForce)
            {
            case EForce.ConstantForce:
                this._forceEffect = new ConstantEffect();
                break;

            case EForce.RampForce:
                this._forceEffect = new RampEffect();
                break;

            case EForce.PeriodicForce:
                this._forceEffect = new PeriodicEffect();
                break;

            case EForce.ConditionalForce:
                this._forceEffect = new ConditionalEffect();
                break;

            default:
                throw new ArgumentOutOfRangeException("effectForce value not supported.");
            }
        }
Exemplo n.º 15
0
        public Notification(OnClickDialogYes dialogOk, string title)
        {
            this.type = EType.Dialog;

            this.title = title;
            this.callbackFuntionYesDialog = dialogOk;
        }
Exemplo n.º 16
0
 public static void ChangeModel(List <ElementModel> list, EType elementType)
 {
     for (int i = 0; i < list.Count; i++)
     {
         list[i].SetActive(list[i].elementType == elementType);
     }
 }
Exemplo n.º 17
0
        public CMeterCom(EType devType, int idNo = 0, string name = "IMeter")
        {
            this._idNo = idNo;

            this._name = name;

            this._devType = devType;

            //反射获取PLC类型

            string plcModule = "C" + devType.ToString();

            Assembly asb = Assembly.GetAssembly(typeof(IMeter));

            Type[] types = asb.GetTypes();

            object[] parameters = new object[2];

            parameters[0] = _idNo;

            parameters[1] = _name;

            foreach (Type t in types)
            {
                if (t.Name == plcModule && t.GetInterface("IMeter") != null)
                {
                    _devMon = (IMeter)asb.CreateInstance(t.FullName, true, System.Reflection.BindingFlags.Default, null, parameters, null, null);
                    break;
                }
            }
        }
Exemplo n.º 18
0
 public Monster(EType type)
 {
     this.type = type;
     head = "images/" + type.ToString() + "_0.png";
     body = "images/" + type.ToString() + "_1.png";
     leg = "images/" + type.ToString() + "_2.png";
 }
Exemplo n.º 19
0
 public void SpawnEnemy(EType type, int amount)
 {
     for (int i = 0; i < amount; i++)
     {
         Spawn("Enemy", type.ToString());
     }
 }
Exemplo n.º 20
0
        /// <summary>
        /// returns a type string by the given type
        /// </summary>
        /// <param name="returnOther">if true, the type other returns "Sonstige" as string, otherwise it returns an empty string</param>
        public static String GetTypeString(EType type, bool returnOther = false)
        {
            switch (type)
            {
            case EType.noun: return("Nomen");

            case EType.verb1: return("う-Verb");

            case EType.verb2: return("る-Verb");

            case EType.verb3: return("する-Verb");

            case EType.iAdjective: return("い-Adj");

            case EType.naAdjective: return("な-Adj");

            case EType.adverb: return("Adverb");

            case EType.particle: return("Partikel");

            case EType.other: return(returnOther ? "Sonstige" : "");

            case EType.prefix: return("Präfix");

            case EType.suffix: return("Suffix");

            case EType.phrase: return("Phrase");

            default: return("");
            }
        }
Exemplo n.º 21
0
        internal static string Convert(EType type)
        {
            switch (type)
            {
            case EType.String:
                return("string");

            case EType.Boolean:
                return("bool");

            case EType.Integer:
                return("int");

            case EType.Double:
                return("double");

            case EType.DateTime:
                return("DateTime");

            case EType.Guid:
                return("Guid");

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }
Exemplo n.º 22
0
 internal Confirmation(ulong id, ulong key, ulong creator, EType type)
 {
     ID      = id > 0 ? id : throw new ArgumentOutOfRangeException(nameof(id));
     Key     = key > 0 ? key : throw new ArgumentOutOfRangeException(nameof(key));
     Creator = creator > 0 ? creator : throw new ArgumentOutOfRangeException(nameof(creator));
     Type    = Enum.IsDefined(type) ? type : throw new InvalidEnumArgumentException(nameof(type), (int)type, typeof(EType));
 }
Exemplo n.º 23
0
// Member Types



// Member Functions


    // Public:


    // Protected:


    override protected void Initialise(ref string _rsDescription, ref EType _reSpellType, ref float _rfCooldownLength, ref float _rfDamageLevelIncrement,
                                       ref float _rfPushbackLevelIncrement, ref float _rfRange, ref uint _ruiCurrancyUpgradeCost, ref float _rfCastDelay)
    {
        CSpellData.TSpellData tData = GameApp.GetInstance().GetSpellDataComponent().GetSpellData(CSpell.EType.SWAP);
        _rsDescription            = tData.sDescription;
        _reSpellType              = tData.eType;
        _rfCooldownLength         = tData.fCooldown;
        _rfDamageLevelIncrement   = tData.fDamageLevelInrement;
        _rfPushbackLevelIncrement = tData.fPushbackLevelIncrement;
        _rfRange = tData.fRange;
        _ruiCurrancyUpgradeCost = tData.uiUpgradeCost;
        _rfCastDelay            = tData.fCastDelay;
        m_fRadius = tData.fRadius;

        m_fCooldownLength = tData.fCooldown;
        m_fCooldownTimerLevelIncrement = tData.fCooldownLevelIncrement;
        m_fCastDelay = tData.fCastDelay;
        m_fCastDelayLevelIncrement = tData.fCastDelayLevelIncrement;
        m_fDamageAmount            = tData.fDamage;
        m_fDamageLevelIncrement    = tData.fDamageLevelInrement;
        m_fPushbackAmount          = tData.fPushback;
        m_fPushbackLevelIncrement  = tData.fPushbackLevelIncrement;
        m_fRange = tData.fRange;
        m_fRangeLevelIncrement = tData.fRangeLevelIncrement;
        m_fRadius = tData.fRadius;
        m_fRadiusLevelIncrement = tData.fRadiusLevelIncrement;
    }
Exemplo n.º 24
0
        public static string TypeToString(EType _type)
        {
            switch (_type)
            {
            case EType.BASE:
                return("Базовая");

            case EType.CROSS:
                return("Пеперечная");

            case EType.LINE:
                return("Продольная");

            case EType.SG:
                return("ГП");

            case EType.THICK_TICKS:
                return("Тики толщины");

            case EType.THICK_VAL:
                return("Толщина");

            case EType.RESULT:
                return("Результат");
            }
            return("Неопределенная");
        }
Exemplo n.º 25
0
        public FrictionModel RestoreLocalDataFrom(agx.FrictionModel native)
        {
            SolveType = Convert(native.getSolveType());
            Type      = FindType(native);

            return(this);
        }
Exemplo n.º 26
0
        public Notification(string message, float timeAutoClose)
        {
            this.type = EType.Message;

            this.message       = message;
            this.timeAutoClose = timeAutoClose;
        }
Exemplo n.º 27
0
        public HelperRun <TInterfaceModel> GetExecutor <TInterfaceModel, TViewModel>(EType type, string stextJson, Operation op)
        {
            IStep <IManagementModelRequest <TInterfaceModel> > _businessLogic = null;

            lock (lockReesource)
            {
                _businessLogic = HI.GetInst().Get <IStep <IManagementModelRequest <TInterfaceModel> > >();
            }

            IMapper _mapper = HI.GetInst().Get <IMapper>();

            TViewModel itemViewModel = JsonConvert.DeserializeObject <TViewModel>(stextJson);
            var        itemModel     = _mapper.Map <TInterfaceModel>(itemViewModel);

            var request = new ManagementModelRequest <TInterfaceModel>
            {
                Item = itemModel,
                Type = op
            };


            HelperRun <TInterfaceModel> pExecutor = new HelperRun <TInterfaceModel>
            {
                BusinessLogic = _businessLogic,
                Request       = request
            };


            return(pExecutor);
        }
Exemplo n.º 28
0
    public Bullet AddBullet(Sprite sprite, EType type, EMaterial material, Vector3 position, float speed = 0, float angle = 0, float acc = 0, float ang_vec = 0)
    {
        Bullet bullet = AddBullet(sprite, type, material);

        bullet.CopyData(sprite, type, material, position, speed, angle, acc, ang_vec);
        return(bullet);
    }
Exemplo n.º 29
0
        public Result(string str)
        {
            if (!IsMatch(str))
            {
                return;
            }
            var mWatch = Regex.Match(str, "watch\\?v=([^\"&]*)");

            if (mWatch.Success)
            {
                ID = mWatch.Groups[1].ToString();
                var mTitle = Regex.Match(str, "title=\"([^\"]*)");
                if (mTitle.Success)
                {
                    Title = mTitle.Groups[1].ToString();
                }
                var mPlaylist = Regex.Match(str, "list=([^\"]*)");
                if (mPlaylist.Success)
                {
                    Playlist = mPlaylist.Groups[1].ToString();
                    Type     = EType.Playlist;
                }
                else
                {
                    Type = EType.Track;
                }
            }
            else
            {
                Type = EType.None;
            }
        }
Exemplo n.º 30
0
 public SystemErrorsUpdateRequest(string machine_name, EType type)
     : base("SystemErrorsUpdateRequest")
 {
     MachineName = machine_name;
     Type        = type;
     LogData     = new EventLogData();
 }
Exemplo n.º 31
0
 public Item(EType type, double weight, double volume, bool isToxicWaste)
 {
     Type         = type;
     Weight       = weight;
     Volume       = volume;
     IsToxicWaste = isToxicWaste;
 }
Exemplo n.º 32
0
 public CArray(int n, EType type, EMemorySpace side, CModel model, string name)
 {
     alloc(n, type, side, model);
     _model = model;
     _suballocated = false;
     _number_of_internal_buffers = 0;
     _internal_buffer_pointers = null;
     _name = name;
 }
        public PictureService(int id, EType type)
        {
            IPictureRepository pictureRepository = ObjectFactory.GetInstance<IPictureRepository>();
            List<Picture> pictures = pictureRepository.GetById(id, type);

            if(pictures == null)
                m_Pictures = new List<Picture>();
            else
                m_Pictures = pictures;
        }
Exemplo n.º 34
0
 public ChessPiece(ChessPiece piece)
 {
     _id = piece.Id;
     _isDied = piece._isDied;
     _color = piece._color;
     _type = piece._type;
     _value = piece._value;
     _point = piece._point;
     _texture2d = piece._texture2d;
     _position = piece._position;
 }
Exemplo n.º 35
0
    public static CGameRegistrator.ENetworkPrefab GetPrefabType(EType _eAccessoryType)
    {
        if (!s_mRegisteredPrefabs.ContainsKey(_eAccessoryType))
        {
            Debug.LogError(string.Format("Accessory type ({0}) has not been registered a prefab", _eAccessoryType));

            return (CGameRegistrator.ENetworkPrefab.INVALID);
        }

        return (s_mRegisteredPrefabs[_eAccessoryType]);
    }
Exemplo n.º 36
0
 public CPGDate( DateTime dt )
 {
     m_etType = EType.Single;
     m_ecCalendar = ECalendar.Gregorian;
     m_year = new CYear( dt.Year );
     m_uMonth = (uint)dt.Month;
     m_uDay = (uint)dt.Day;
     m_yearTo = null;
     m_uMonthTo = 0;
     m_uDayTo = 0;
     m_sPhrase = "";
 }
Exemplo n.º 37
0
        public CRoboCard( EType aType, Image aImage, int aX, int aY, int aSizeX, int aSizeY )
        {
            theType = aType;
            theImage = aImage;

            theX = aX;
            theY = aY;
            theSizeX = aSizeX;
            theSizeY = aSizeY;
            switch( aType)
            {

                case EType.ET_Number00:                    theNumber = 0;                    break;
                case EType.ET_Number02:                    theNumber = 2;                    break;
                case EType.ET_Number03:                    theNumber = 3;                    break;
                case EType.ET_Number04:                    theNumber = 4;                    break;
                case EType.ET_Number05:
             theNumber = 5;
                    break;
                case EType.ET_Number06:
                    theNumber = 6;
                    break;
                case EType.ET_Number07:
                    theNumber = 7;
                    break;
                case EType.ET_Number08:
                    theNumber = 8;
                    break;
                case EType.ET_Number09:
                    theNumber = 9;
                    break;
                case EType.ET_Number10:
                    theNumber = 10;
                    break;

                case EType.ET_Number11:                    theNumber = 11;                    break;
                case EType.ET_Number22:                    theNumber = 22;                    break;
                    case EType.ET_Number33:                    theNumber = 33;                    break;
                    case EType.ET_Number44:                    theNumber = 44;                    break;
                case EType.ET_Number55:                    theNumber = 55;                    break;

            }
        }
Exemplo n.º 38
0
        // Copy constructor
        public CPGDate( CPGDate date )
        {
            m_etType = date.m_etType;
            m_ecCalendar = date.m_ecCalendar;
            if( date.m_year != null )
                m_year = new CYear( date.m_year );
            else
                m_year = null;
            m_uMonth = date.m_uMonth;
            m_uDay = date.m_uDay;
            if( date.m_yearTo != null )
                m_yearTo = new CYear( date.m_yearTo );
            else
                m_yearTo = null;

            m_uMonthTo = date.m_uMonthTo;
            m_uDayTo = date.m_uDayTo;
            m_sPhrase = date.m_sPhrase;
        }
Exemplo n.º 39
0
        public LabeledWidget(Texture picture = null, EMode mode = DEFAULT_MODE)
            : base()
        {
            if (picture != null)
            {
                Mode = mode;
                Type = EType.Picture;

                Picture = new Button(picture, null);
                Picture.Dimension = new SFML.Window.Vector2f(DEFAULT_PICTURE_SIZE, DEFAULT_PICTURE_SIZE);

                switch (Mode)
                {
                    case EMode.Left:
                    case EMode.Right: HBox = new HAutoSizeBox(true, null, DEFAULT_BOXPICTURE_OFFSET); AddWidget(HBox); break;
                    case EMode.Top:
                    case EMode.Bottom: VBox = new VAutoSizeBox(true, null, DEFAULT_BOXPICTURE_OFFSET); AddWidget(VBox); break;
                }
            }
        }
Exemplo n.º 40
0
        protected ExtendedBox(EType type = DEFAULT_TYPE, Boolean noBorderMode = true, Int32 size = DEFAULT_SIZE)
            : base()
        {
            Size = size;
            CurrentPointer = 0;

            ExtendedItems = new List<Widget>();

            Type = type;

            if (Type == EType.Vertical)
            {
                VMainBox = new VAutoSizeBox(noBorderMode);
                AddWidget(VMainBox);
            }
            else
            {
                HMainBox = new HAutoSizeBox(noBorderMode);
                AddWidget(HMainBox);
            }
        }
Exemplo n.º 41
0
 /* PUBLIC METHODS */
 public void SelectType(EType type)
 {
     switch (type)
     {
         case EType.Constant:
             SelectedType = _complexType.Constant;
             break;
         case EType.Variable:
             SelectedType = _complexType.Variable;
             break;
         case EType.Function:
             SelectedType = _complexType.Function;
             break;
         case EType.Reference:
             SelectedType = _complexType.Reference;
             break;
         case EType.Keyword:
             SelectedType = _complexType.Keyword;
             break;
     }
 }
        public List<Picture> GetById(int id, EType type)
        {
            using (ISession session = SessionBase.OpenSession())
            {
                ICriteria crit = session.CreateCriteria(typeof(Picture));
                if(type.Equals(EType.Figur))
                {
                    crit.Add<Picture>(exp => exp.Fk_Figur_Id.Id == id);
                }
                if(type.Equals(EType.Serie))
                {
                    crit.Add<Picture>(exp => exp.Fk_Serie_Id.Id == id);
                }
                if(type.Equals(EType.Instructions))
                {
                    crit.Add<Picture>(exp => exp.Fk_Instructions_Id.Id== id);
                }

                return crit.List().Cast<Picture>().ToList();
            }
        }
Exemplo n.º 43
0
        public H2BitmapCollection(Stream stream, int offset, int magic)
        {
            BinaryReader binReader = new BinaryReader(stream);
            stream.Position = offset;

            Type = (EType)binReader.ReadInt16();
            Format = (EFormat)binReader.ReadInt16();
            Usage = (EUsage)binReader.ReadInt16();
            Flags = (EFlags)binReader.ReadInt16();
            DetailFadeFactor = binReader.ReadSingle();
            SharpenAmount = binReader.ReadSingle();
            BumpHeight = binReader.ReadSingle();
            SpriteBudgetSize = (ESpriteBudgetSize)binReader.ReadInt16();
            SpriteBudgetCount = binReader.ReadInt16();
            ColourPlateWidth = binReader.ReadInt16();
            ColourPlateHeight = binReader.ReadInt16();
            CompressedColourPlateDataCount = binReader.ReadInt32();
            CompressedColourPlateDataPointer = binReader.ReadInt32();
            ProcessedPixelDataCount = binReader.ReadInt32();
            ProcessedPixelDataPointer = binReader.ReadInt32();
            BlueFilterSize = binReader.ReadSingle();
            AlphaBias = binReader.ReadSingle();
            MipmapCount = binReader.ReadInt16();
            SpriteUsage = (ESpriteUsage)binReader.ReadInt16();
            SpriteSpacing = binReader.ReadInt16();
            ForceFormat = binReader.ReadInt16();

            int sequenceCount = binReader.ReadInt32();
            int sequencePointer = binReader.ReadInt32();
            int bitmapCount = binReader.ReadInt32();
            int bitmapPointer = binReader.ReadInt32();

            Sequences = new Sequence[sequenceCount];
            for (int i = 0; i < sequenceCount; i++)
                Sequences[i] = new Sequence(stream, (sequencePointer - magic) + (i * Sequence.SizeOf), magic);

            Bitmaps = new BitmapData[bitmapCount];
            for (int i = 0; i < bitmapCount; i++)
                Bitmaps[i] = new BitmapData(stream, (bitmapPointer - magic) + (i * BitmapData.SizeOf));
        }
Exemplo n.º 44
0
 public void create_tower(EType type_tower)
 {
     switch (type_tower)
     {
         case EType.GENERATOR:
             this.TurretList.Add(new Generator(_node._position.X, _node._position.Y, this));
             transfert_connect(_node._position);
             break;
         case EType.SHOOTER:
             this.TurretList.Add(new Shooter(_node._position.X, _node._position.Y, 10, 10, this));
             transfert_connect(_node._position);
             break;
         case EType.SPEED:
             this.TurretList.Add(new Speed(_node._position.X, _node._position.Y, 10, 10, this));
             transfert_connect(_node._position);
             break;
         case EType.STRENGHT:
             this.TurretList.Add(new Strenght(_node._position.X, _node._position.Y, 10, 10, this));
             transfert_connect(_node._position);
             break;
     }
 }
Exemplo n.º 45
0
        public LabeledWidget(String label = null, EMode mode = DEFAULT_MODE, Boolean shortCutMode = DEFAULT_SHORTCUT_MODE)
            : base()
        {
            if (label != null)
            {
                Mode = mode;
                Type = EType.Label;

                Label = new Button(label, Button.EMode.Label);

                switch (Mode)
                {
                    case EMode.Left:
                    case EMode.Right: HBox = new HAutoSizeBox(true, null); AddWidget(HBox); break;
                    case EMode.Top:
                    case EMode.Bottom: VBox = new VAutoSizeBox(true, null); AddWidget(VBox); break;
                }

                ShortCutMode = shortCutMode;

                if (Label.Text.Length > 0)
                    ShortCutKey = WindowEvents.KeyCodeFromString(Label.Text[0].ToString());
            }
        }
Exemplo n.º 46
0
 public CInteraction(int num, EType type)
 {
     _Num = num;
     _Type = type;
 }
Exemplo n.º 47
0
 public TicketNotification(EType type)
 {
     Type = type;
 }
Exemplo n.º 48
0
 public static void Notify(ApplicationDbContext db, Ticket ticket, DateTimeOffset date, EType type)
 {
     // Create new object, init fields and save
     TicketNotification tn = new TicketNotification();
     // Don't need to create notification if the Developer is same as the User who generated the event
     if (ticket.AssignedToDevId != null)
     {
         if (ticket.AssignedToDevId != ticket.OwnerUserId)
         {
             tn.TicketId = ticket.Id;
             tn.UserId = ticket.AssignedToDevId;
             tn.Type = type;
             tn.Created = DateTimeOffset.UtcNow;
             db.TicketNotifications.Add(tn);
             db.SaveChanges();
         }
     }
 }
Exemplo n.º 49
0
 // Create a notification entry...
 public static void Notify(ApplicationDbContext db, int ticketId, DateTimeOffset date, EType type)
 {
     Ticket ticket = db.Tickets.Find(ticketId);
     Notify(db, ticket, date, type);
 }
Exemplo n.º 50
0
 public static string GetStr(EType type)
 {
     return vals[(int)type - 1];
 }
Exemplo n.º 51
0
	internal MoveToPositionOrder(Vector3 a_position, EType a_type) : base (a_position)
	{
		_type = a_type;
	}
Exemplo n.º 52
0
        private void alloc(int n, EType type, EMemorySpace side, CModel model)
        {
            if (n == 0) return;
            if (_model == null)
            {
                _model = model;
            }
            else
            {
                if (_model != model) throw new System.Exception();
            }

            this._type = type;
            this._side = side;
            if (_sz == 0)
            {
                if (side == EMemorySpace.device)
                {
                    if (_suballocated) throw new System.Exception();
                    _ptr = opcuda_mem_alloc((uint)(Size_of_one * n));
                }
                else
                {
                    if (_suballocated) throw new System.Exception();
                    _hptr = opcuda_mem_alloc_host((uint)(Size_of_one * n));
                }

                int status = opcuda_get_status();
                if (status != 0) throw new System.Exception();
                _length = n;
                _sz = Size_of_one * n;
                return;
            }
            if (_sz < Size_of_one * n)
            {
                if (side == EMemorySpace.device)
                {
                    if (_suballocated) throw new System.Exception();
                    opcuda_mem_free_device(ptr);
                    _ptr = opcuda_mem_alloc((uint)(Size_of_one * n));
                }
                else
                {
                    if (_suballocated) throw new System.Exception();
                    opcuda_mem_free_host(hptr);
                    _hptr = opcuda_mem_alloc_host((uint)(Size_of_one * n));
                }

                int status = opcuda_get_status();
                if (status != 0) throw new System.Exception();
                _sz = Size_of_one * n;
                _length = n;
                return;
            }
            _length = n;
        }
Exemplo n.º 53
0
 public static void RegisterPrefab(EType _ToolType, CGameRegistrator.ENetworkPrefab _ePrefab)
 {
     s_mRegisteredPrefabs.Add(_ToolType, _ePrefab);
 }
Exemplo n.º 54
0
        SetType(
            EType type)
        {
            if (this.Type != EType.NA)
            {
                throw new Bam.Core.Exception("Project configuration already has type {0}. Cannot change it to {1}", this.Type.ToString(), type.ToString());
            }

            this.Type = type;
        }
Exemplo n.º 55
0
 public static int get_cost_tower(EType type)
 {
     switch (type)
     {
         case EType.GENERATOR:
             return (50);
         case EType.SHOOTER:
             return (30);
         case EType.SPEED:
             return (100);
         case EType.STRENGHT:
             return (100);
     }
     return (0);
 }
Exemplo n.º 56
0
 public CameraEffectEvent(EType etype, XftEventComponent owner)
     : base(XEventType.CameraEffect, owner)
 {
     m_effectType = etype;
 }
Exemplo n.º 57
0
	public static void RegisterPrefab(EType _DUIType, CGameRegistrator.ENetworkPrefab _NetworkPrefab)
	{
		s_RegisteredPrefabs.Add(_DUIType, _NetworkPrefab);
	}
Exemplo n.º 58
0
 public static string GetMsg(EType type)
 {
     return msgs[(int)type-1];
 }
Exemplo n.º 59
0
 private void AddInteraction(int num, EType type)
 {
     _Interactions.Add(new CInteraction(num, type));
     if (!_Interactions[_Selection].ThemeEditorOnly)
         _SetSelected();
     else
         _NextInteraction();
 }
Exemplo n.º 60
0
 public GameExeption(EType type)
 {
     mType = type;
 }