示例#1
0
文件: Laser.cs 项目: Bagoum/danmokou
        public static void Request(BEHStyleMetadata style, BehaviorEntity?parent, Movement vel, ParametricInfo pi,
                                   float cold, float hot, SOPlayerHitbox collisionTarget, ref RealizedLaserOptions options)
        {
            Laser created = (Laser)BEHPooler.RequestUninitialized(style.RecolorOrThrow.prefab, out bool isNew);

            created.Initialize(isNew, parent, vel, pi, collisionTarget, cold, hot, style, ref options);
        }
示例#2
0
文件: Pather.cs 项目: Bagoum/danmokou
 private void Initialize(bool isNew, Movement movement, ParametricInfo pi, SOPlayerHitbox _target, float maxRemember,
                         BPY remember, BEHStyleMetadata style, ref RealizedBehOptions options)
 {
     ctr.SetYScale(options.scale); //Needs to be done before Colorize sets first frame
     //Order is critical so rBPI override points to initialized data on SM start
     ctr.Initialize(this, config, style.RecolorOrThrow.material, isNew, movement, pi, remember, maxRemember, _target, ref options);
     base.Initialize(style, options, null, movement.WithNoMovement(), pi, _target, out int layer); // Call after Awake/Reset
     ctr.Activate();                                                                               //This invokes UpdateMesh
 }
示例#3
0
 public override void Initialize(BEHStyleMetadata?style, RealizedBehOptions options,
                                 BehaviorEntity?parent, Movement mov, ParametricInfo pi, SOPlayerHitbox _target,
                                 out int layer)
 {
     if (style?.recolor != null)
     {
         Colorize(style.recolor.GetOrLoadRecolor());
     }
     base.Initialize(style, options, parent, mov, pi, _target, out layer);
 }
示例#4
0
 public virtual void Initialize(BEHStyleMetadata?style, RealizedBehOptions options, BehaviorEntity?parent, Movement mov, ParametricInfo pi, SOPlayerHitbox _target, out int layer)
 {
     base.Initialize(style, mov, pi, options.smr, parent, options: options);
     gameObject.layer = layer = options.layer ?? DefaultLayer;
     collisionTarget  = _target;
 }
示例#5
0
文件: Laser.cs 项目: Bagoum/danmokou
 private void Initialize(bool isNew, BehaviorEntity?parent, Movement movement, ParametricInfo pi, SOPlayerHitbox _target, float cold, float hot, BEHStyleMetadata style, ref RealizedLaserOptions options)
 {
     pi.ctx.laserController = ctr;
     ctr.SetYScale(options.yScale * defaultWidthMultiplier);                      //Needs to be done before Colorize sets first frame
     base.Initialize(style, options.AsBEH, parent, movement, pi, _target, out _); // Call after Awake/Reset
     if (options.endpoint != null)
     {
         var beh = BEHPooler.INode(Movement.None, new ParametricInfo(Vector2.zero, bpi.index),
                                   Vector2.right, options.endpoint);
         endpt = new PointContainer(beh);
         ctr.SetupEndpoint(endpt);
     }
     else
     {
         ctr.SetupEndpoint(new PointContainer(null));
     }
     ctr.Initialize(this, config, style.RecolorOrThrow.material, isNew, bpi, ref options);
     SFXService.Request(options.firesfx);
     SetColdHot(cold, hot, options.hotsfx, options.repeat);
     ctr.Activate(); //This invokes UpdateMesh
 }
示例#6
0
文件: Pather.cs 项目: Bagoum/danmokou
        public static void Request(BEHStyleMetadata style, Movement movement, ParametricInfo pi, float maxRemember, BPY remember, SOPlayerHitbox collisionTarget, ref RealizedBehOptions opts)
        {
            Pather created = (Pather)BEHPooler.RequestUninitialized(style.RecolorOrThrow.prefab, out bool isNew);

            created.Initialize(isNew, movement, pi, collisionTarget, maxRemember, remember, style, ref opts);
        }