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; }
public static EffectEntity create(EffectType type) { EffectEntity entity = createEntity(type); entity.game_object = createGameObject(entity); entity.game_object.SetActive(false); return(entity); }
public static void Run( Effect.Type fxtype, BaseEntity ent, uint boneID, Vector3 posLocal, Vector3 normLocal) { }
public void TakeEffect(Effect.Type type, float time, float value) { switch (type) { case Effect.Type.Speed: _movement.ChangeSpeed(time, value); break; } }
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); }
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); }
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); }
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)); }
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(); }
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); }
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; }
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; }
public bool HasEffect(Effect.Type effectType) { return(effectsByType.ContainsKey(effectType) && effectsByType[effectType].Count > 0); }
public static void Run(Effect.Type fxtype, Vector3 posWorld, Vector3 normWorld, Vector3 up = null) { }