示例#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
            public BEHStyleMetadata MakePlayerCopy(string newPool)
            {
                var bsm = new BEHStyleMetadata(newPool, recolor?.MakePlayerCopy());

                bsm.SetPlayer();
                return(bsm);
            }
示例#3
0
 protected virtual void UpdateStyle(BEHStyleMetadata newStyle)
 {
     myStyle = newStyle;
     if (displayer != null)
     {
         displayer.UpdateStyle(myStyle);
     }
 }
示例#4
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
 }
示例#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
文件: Laser.cs 项目: Bagoum/danmokou
 protected override void UpdateStyle(BEHStyleMetadata newStyle)
 {
     base.UpdateStyle(newStyle);
     ctr.UpdateLaserStyle(newStyle.style);
 }
示例#7
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);
        }