E ticaret

Tedarikçi Arama: E-Ticaret mağazanız için en iyi tedarikçiyi nasıl bulabilirsiniz? #Dropshipping İpuçları #Tedarikçi #Yeniden Fiyatlandırma El yapımı veya niş ürünler satmıyorsanız, e-ticaret mağazanızda satmanız gereken ürünleri size sağlaması için güvenilir bir tedarikçi bulmak isteyeceksiniz. Mağazanız için en iyi tedarikçiyi bulmak e-ticaret yapan kişilerin yaşadığı bir zorluktur. Dışarıda bir sürü tedarikçi olduğunu görüyorsunuz, hepsi görünüşte harika fırsatlar sunuyor, sadece kaliteli ürünler değil aynı zamanda iyi marjlar sunan bir tedarikçiyi nasıl buluyorsunuz? Bu blog yazımızda, e-ticaret mağazanıza iyi bir tedarikçi bulmak için kullanmanız gereken stratejiyi ana hatlarıyla açıklayacağız. Şunları öğreneceksiniz: 1. Tedarikçileri bulmak için en iyi platformlar 2. Neden birden fazla tedarikçiye ulaşmanız gerektiği 3. Tedarikçinin yorumlarını ve referanslarını okumanın önemini 4. Karar vermeden önce bütün numuneleri nasıl almanız gerektiği 5. Nasıl pazarlık yapabileceğinizi Ted

[TUT] Using custom Classes

I use classes basically when i need to add properties or methods to an game object, for example in Iron Man IV i use classes to control all the enemies or allies behavior (flight, shoot, target locking, etc.), in Heli Combat i use classes to make the Nightvision effect, it's very useful.

For example, let's say that we want get peds damaged by player and make them float for a while, each shoot will make them float for 1 second. We can create an simple class that holds the Ped, the time of float state, an trigger to start/increase the float state and the method that will make them float:


Here we have:
Public p as Ped = Nothing - this is the ped, i set = nothing to make sure that starts with nothing for the ped object, this is a Public property, it means that we can access it outside the class
Private float_time As Double = 0 - this is how much time the ped will float, an counter, its Private because i don't need to access it outside the class
Public Sub New(tPed As Ped)
    p = tPed
End Sub 
Here i set the method that will be called when a new instance of this class is created, i receive as param the Ped that will float
Public Sub startFloat()
    float_time += 1000
End Sub
 
Here i set the method that will increase the float time when the ped was damaged by player
Public Sub Tick()
    If float_time > 0 Then
        float_time -= myInterval
        p.Velocity = Vector3.WorldUp
    End If
End Sub
 
This is the Tick of the class, will be called at each tick of the script to make the float happens

One important detail, inside the Tick method i use the variable  myInterval, i had to declare this variable as an Shared variable in the script to be able to use it inside the class:


So to use an method or variable that is outside the custom Class we need to declare this method or variable as Shared instead of Public or Private.

Now to make it work i need to check for peds around player, check if they was damaged by player then add they to the List of objects of the custom class TFloatingPed, this list i called floatingPeds:


So in the tick of the script i will use an time counter to refresh the peds list at each 500 ms, then check if one of them was damaged by player and add to the list of floating peds, run the floating peds list and make them float:


With this class we can add an Blip object to it so we can create, change color, scale and destroy when we want just accessing the class instance, each class instance will have an blip object.

We can use this idea of classes in many cases, for example we can create an Rocket class, that will have an object that is the rocket, an Fly method that will make it fly and check for collisions, and we can create a lot of rockets and shoot them all and the tick of each class object will do the job (fly and explode on collision), i do this in Iron Man IV and Heli Combat, it's very useful.

I used this class idea in chainsaw script too, to create the blood drips on screen. Download the source code of chainsaw script here.

Download the project of this tutorial here.

Yorumlar

Bu blogdaki popüler yayınlar

Beden dili hareketleri ve anlamları

Top 10 porno yildizlari

En İyi Skyrim Modları