コード例 #1
0
    public void Init(Effect.Type fxtype, BaseEntity ent, uint boneID, Vector3 posLocal, Vector3 normLocal, Connection sourceConnection = null)
    {
        uint d;

        this.Clear();
        this.type       = (uint)fxtype;
        this.attached   = true;
        this.origin     = posLocal;
        this.normal     = normLocal;
        this.gameObject = null;
        this.Up         = Vector3.zero;
        if (ent != null && !ent.IsValid())
        {
            Debug.LogWarning("Effect.Init - invalid entity");
        }
        if (ent.IsValid())
        {
            d = ent.net.ID;
        }
        else
        {
            d = 0;
        }
        this.entity = d;
        this.source = (sourceConnection != null ? sourceConnection.userid : (ulong)((long)0));
        this.bone   = boneID;
    }
コード例 #2
0
        public static EffectEntity create(EffectType type)
        {
            EffectEntity entity = createEntity(type);

            entity.game_object = createGameObject(entity);
            entity.game_object.SetActive(false);
            return(entity);
        }
コード例 #3
0
ファイル: Effect.cs プロジェクト: mlgodzilla/Decompiled-Rust
 public static void Run(
     Effect.Type fxtype,
     BaseEntity ent,
     uint boneID,
     Vector3 posLocal,
     Vector3 normLocal)
 {
 }
コード例 #4
0
ファイル: Player.cs プロジェクト: vaad23/SHK-Unity
 public void TakeEffect(Effect.Type type, float time, float value)
 {
     switch (type)
     {
     case Effect.Type.Speed:
         _movement.ChangeSpeed(time, value);
         break;
     }
 }
コード例 #5
0
ファイル: Effect.cs プロジェクト: mlgodzilla/Decompiled-Rust
 public static void Run(
     Effect.Type fxtype,
     Vector3 posWorld,
     Vector3 normWorld,
     Connection sourceConnection = null,
     bool broadcast = false)
 {
     Effect.reusableInstace.Init(fxtype, posWorld, normWorld, sourceConnection);
     Effect.reusableInstace.broadcast = broadcast;
     EffectNetwork.Send(Effect.reusableInstace);
 }
コード例 #6
0
        public static EffectEntity createEntity(EffectType type)
        {
            if (!base_resources.ContainsKey(type))
            {
                throw new KeyNotFoundException();
            }

            EffectEntity entity = base_resources[type].clone();

            entity.id  = effect_id;
            effect_id += 1;
            return(entity);
        }
コード例 #7
0
ファイル: Effect.cs プロジェクト: mlgodzilla/Decompiled-Rust
 public static void Run(
     Effect.Type fxtype,
     BaseEntity ent,
     uint boneID,
     Vector3 posLocal,
     Vector3 normLocal,
     Connection sourceConnection = null,
     bool broadcast = false)
 {
     Effect.reusableInstace.Init(fxtype, ent, boneID, posLocal, normLocal, sourceConnection);
     Effect.reusableInstace.broadcast = broadcast;
     EffectNetwork.Send(Effect.reusableInstace);
 }
コード例 #8
0
 public void Init(Effect.Type fxtype, Vector3 posWorld, Vector3 normWorld, Connection sourceConnection = null)
 {
     this.Clear();
     this.type       = (uint)fxtype;
     this.attached   = false;
     this.worldPos   = posWorld;
     this.worldNrm   = normWorld;
     this.gameObject = null;
     this.Up         = Vector3.zero;
     this.entity     = 0;
     this.origin     = this.worldPos;
     this.normal     = this.worldNrm;
     this.bone       = 0;
     this.source     = (sourceConnection != null ? sourceConnection.userid : (ulong)((long)0));
 }
コード例 #9
0
    public void AddEffect(CardHolder cardHolder, Effect.Type type, int amount, int duration, Character target)
    {
        Effect newEffect = new Effect
        {
            type       = type,
            effectCard = cardHolder.card,

            amount   = amount,
            duration = duration,

            effectReceiver = target
        };

        activeEffects.Add(newEffect);

        CheckActiveEffects();
    }
コード例 #10
0
    public int CheckForPassiveEffect(Effect.Type type, Character effectReceiver)
    {
        int effectValue = 0;

        foreach (Effect effect in activeEffects)
        {
            if (effect.type == type)
            {
                if (effect.effectReceiver == effectReceiver)
                {
                    effectValue += effect.amount;
                }
            }
        }

        return(effectValue);
    }
コード例 #11
0
ファイル: Effect.cs プロジェクト: mlgodzilla/Decompiled-Rust
 public void Init(
     Effect.Type fxtype,
     Vector3 posWorld,
     Vector3 normWorld,
     Connection sourceConnection = null)
 {
     this.Clear();
     this.type       = (__Null)(int)fxtype;
     this.attached   = false;
     this.worldPos   = posWorld;
     this.worldNrm   = normWorld;
     this.gameObject = (GameObject)null;
     this.Up         = Vector3.get_zero();
     this.entity     = (__Null)0;
     this.origin     = (__Null)this.worldPos;
     this.normal     = (__Null)this.worldNrm;
     this.bone       = (__Null)0;
     this.source     = sourceConnection != null ? (__Null)(long)sourceConnection.userid : (__Null)0L;
 }
コード例 #12
0
ファイル: Effect.cs プロジェクト: mlgodzilla/Decompiled-Rust
 public void Init(
     Effect.Type fxtype,
     BaseEntity ent,
     uint boneID,
     Vector3 posLocal,
     Vector3 normLocal,
     Connection sourceConnection = null)
 {
     this.Clear();
     this.type       = (__Null)(int)fxtype;
     this.attached   = true;
     this.origin     = (__Null)posLocal;
     this.normal     = (__Null)normLocal;
     this.gameObject = (GameObject)null;
     this.Up         = Vector3.get_zero();
     if (Object.op_Inequality((Object)ent, (Object)null) && !ent.IsValid())
     {
         Debug.LogWarning((object)"Effect.Init - invalid entity");
     }
     this.entity = ent.IsValid() ? (__Null)(int)ent.net.ID : (__Null)0;
     this.source = sourceConnection != null ? (__Null)(long)sourceConnection.userid : (__Null)0L;
     this.bone   = (__Null)(int)boneID;
 }
コード例 #13
0
 public bool HasEffect(Effect.Type effectType)
 {
     return(effectsByType.ContainsKey(effectType) && effectsByType[effectType].Count > 0);
 }
コード例 #14
0
 public static void Run(Effect.Type fxtype, Vector3 posWorld, Vector3 normWorld, Vector3 up = null)
 {
 }