public AbilityHitPointEvent(Vector3 point, PointContext context)
 {
     this.point   = point;
     this.context = context;
     //ability = context.ability;
     //caster = ability.caster;
 }
Beispiel #2
0
    public void SetContext(Context context)
    {
        this.context = context as PointContext;
        targetPoint  = this.context.point;//.position;
        Vector2 offset = Random.insideUnitCircle * originXZOffsetRadius;

        originPoint        = targetPoint + (Vector3.up * spawnHeight);
        originPoint.x     += offset.x;
        originPoint.z     += offset.y;
        transform.position = originPoint;
    }
            public static PointContext Create(string assemblyName, string mainversion)
            {
                var rtn = new PointContext();

                rtn.MainVersion = mainversion;
                Assembly asm = Assembly.Load(new AssemblyName(assemblyName));

                Type[] ts   = asm.GetTypes();
                var    reg  = new Regex(@"(?<=.)V\d+._\d+", RegexOptions.IgnoreCase);
                var    list = ts.Where(p => p.GetTypeInfo().IsSubclassOf(typeof(EndPoint))).ToList();

                foreach (var t in list.Where(p => p.GetTypeInfo().BaseType == typeof(EndPoint)))
                {
                    var ple = PointLogicEntity.LoadSubpoint(t, list);
                    var key = $"{ple.APIVersion}-{ple.LogicName}";
                    if (!rtn._d_entry_.ContainsKey(ple.APIVersion))
                    {
                        rtn._d_entry_.Add(ple.APIVersion, new Dictionary <string, PointLogicEntity>());
                    }
                    rtn._d_entry_[ple.APIVersion].Add(ple.LogicName, ple);
                }
                rtn.RouteDesc     = FrameDLRObject.CreateInstance(FrameDLRFlags.SensitiveCase);
                rtn.MainRouteDesc = FrameDLRObject.CreateInstance(FrameDLRFlags.SensitiveCase);
                foreach (var ver in rtn._d_entry_.Keys)
                {
                    rtn.RouteDesc.SetValue(ver, FrameDLRObject.CreateInstance(FrameDLRFlags.SensitiveCase));
                    dynamic vroute = rtn.RouteDesc.GetValue(ver);

                    foreach (var item in rtn._d_entry_[ver])
                    {
                        var index = 0;
                        foreach (var rm in item.Value.RouteTable)
                        {
                            index++;
                            var info = FrameDLRObject.CreateInstance(FrameDLRFlags.SensitiveCase);
                            info.Desc = rm.Value.RouteDesc;
                            info.Url  = rm.Key;
                            vroute.SetValue(ver + "-" + index, info);
                            if (ver == rtn.MainVersion)
                            {
                                var mvinfo = FrameDLRObject.CreateInstance(FrameDLRFlags.SensitiveCase);
                                mvinfo.Desc = rm.Value.RouteDesc;
                                mvinfo.Url  = rm.Key.Replace($"/{ver}", "");
                                rtn.MainRouteDesc.SetValue(ver + "-" + index, mvinfo);
                            }
                        }
                    }
                }

                return(rtn);
            }
 public SquaresController(PointContext context)
 {
     _context = context;
 }
Beispiel #5
0
 public PointHistoryService(IPointRepository pointRepository, PointContext pointContext)
 {
     this.pointRepository = pointRepository ?? throw new ArgumentNullException("pointHistoryService");
     this.pointContext    = pointContext ?? throw new ArgumentNullException("pointHistoryService");
 }
 public PointsController(PointContext context)
 {
     _context = context;
 }
Beispiel #7
0
 public override void SetContext(DecisionContext context)
 {
     this.context = context as PointContext;
 }