Exemplo n.º 1
0
        private void HandleCastingJolt()
        {
            var jolt = this.Data.Source.GameHandle.GetComponent <SIntervalJoltScript>();

            if (jolt == null)
            {
                // TODO: Const out
                var data = new SIntervalJoltScriptData();
                data.Perpetual    = true;
                data.Speed        = 10f;
                data.TimeInterval = 1f;
                data.ToJolt       = this.Data.Source.GameHandle;
                data.X            = 0.1f;
                data.Y            = 0.1f;
                jolt = this.Data.Source.GameHandle.AddComponent <SIntervalJoltScript>();
                jolt.Init(data);
            }
        }
Exemplo n.º 2
0
 private void ProcessShake(object o)
 {
     foreach (var hit in this.Data.FatalHits)
     {
         if (hit.Data.Target.Current != null &&
             hit.Data.Target.Current.GetType().Equals(typeof(CChar)))
         {
             var tgt  = hit.Data.Target.Current as CChar;
             var data = new SIntervalJoltScriptData();
             data.Dur          = 4f;
             data.Speed        = 22f;
             data.TimeInterval = 0.18f;
             data.ToJolt       = tgt.GameHandle;
             data.X            = 0.1f;
             data.Y            = 0.025f;
             var jolt = tgt.GameHandle.AddComponent <SIntervalJoltScript>();
             jolt.AddCallback(this.HandleWeen);
             jolt.AddObjectToList(hit);
             this._fatalityMap.Add(jolt.ID, jolt);
             jolt.Init(data);
         }
     }
 }