private void TickDamage(TargetContext enemy) { if (enemy == null || enemy.healthComponent == null || enemy.mainHurtBox == null) { return; } if (enemy.burnManager != null) { enemy.burnManager.SetSkinDuration(this.skin, this.igniteDuration); } IgnitionOrb orb = new IgnitionOrb(); orb.attacker = this.attacker; orb.crit = this.crit; orb.normal = Vector3.Normalize(enemy.mainHurtBox.transform.position - this.origin); orb.origin = enemy.mainHurtBox.transform.position; orb.skin = this.skin; orb.target = enemy.mainHurtBox; orb.team = this.team; orb.igniteStacksPerTick = this.igniteStacksPerTick; orb.igniteProcCoef = this.igniteProcCoef; orb.igniteTickDmg = this.igniteTickDamage; orb.igniteTickFreq = this.igniteTickFreq; orb.igniteTime = this.igniteDuration; orb.igniteDamageColor = this.igniteDamageColor; orb.igniteDeathStacksMult = this.igniteDeathStacksMult; orb.igniteBaseStacksOnDeath = this.igniteBaseStacksOnDeath; orb.igniteExpireStacksMult = this.igniteExpireStacksMult; orb.parent = this; RoR2.Orbs.OrbManager.instance.AddOrb(orb); this.children.Add(orb); enemy.healthComponent.body.AddTimedBuff(this.b, this.igniteDuration); }
public override float Score(IAIContext _context) { TargetContext context = (TargetContext)_context; //var targets = context._surroundingHexCells; return(score = 100f / context.oil); }
public void 描画対象にする(TargetContext context) { this.描画ターゲットコンテキスト = context; context.ビューポートを設定する(); _レンダーターゲットを更新する(); }
public GameTarget(TargetDescriptor descriptor, TargetContext context) : base(descriptor, context) { this.LaunchModule = typeof(DemoApp); this.Type = TargetType.Game; this.LinkType = TargetLinkType.Modular; }
public void ワールド座標をすべて更新する(TargetContext target) { target.ワールド空間.すべてのDynamicTextureを更新する(); target.ワールド空間.すべてのMovableを更新する(); // 自身も更新。 this.更新通知(this, new EventArgs()); }
internal object ResolveName(string name) { object namedObject = null; if (CanAssignDirectly) { foreach (INameScopeDictionary nameScope in NameScopeDictionaryList) { namedObject = nameScope.FindName(name); if (namedObject != null) { break; } } } else { TargetContext.IsInitializedCallback = null; namedObject = TargetContext.ResolveName(name, out _); } return(namedObject); }
public DelayedMessageHandler(TargetContext context) { this.context = context; }
public Canvas.ResolvedContext AcquireRegion(Size dimensions, Canvas target) { Rectangle adjustedRegion; ComputeOffsetRegion(dimensions, out adjustedRegion); if(adjustedRegion.Area > _FreeArea) { return null; } Rectangle? result = InsertIntoSurface(adjustedRegion.Size); if(result != null) { float finalX = result.Value.X + adjustedRegion.X; float finalY = result.Value.Y + adjustedRegion.Y; Rectangle region = new Rectangle(finalX, finalY, dimensions); _FreeArea -= adjustedRegion.Area; var context = new TargetContext(target, region, this); _UsedRegions.Add(context); return context; } return null; }
public ContactController(TargetContext context) { db = context; }
public Canvas.ResolvedContext AcquireRegion(Size dimensions, Canvas target) { Rectangle adjustedRegion; ComputeOffsetRegion(dimensions, out adjustedRegion); Rectangle? result = InsertIntoSurface(adjustedRegion.Size); if(result != null) { float finalX = result.Value.X + adjustedRegion.X; float finalY = result.Value.Y + adjustedRegion.Y; Rectangle region = new Rectangle(finalX, finalY, dimensions); CanvasData data; data.ActualRegion = result.Value; data.CanvasReference = new WeakReference(null); var context = new TargetContext(target, region, this, new LinkedListNode<CanvasData>(data)); context.Node.Value.CanvasReference.Target = context; _UsedRegions.AddLast(context.Node); return context; } return null; }
public override bool BuildCommandBuffer(RenderPipeline pipeline, CommandBuffer commandBuffer, TargetContext context, IPostProcess nextProcess) { if (context.CompareSource0ToTarget0() != false && nextProcess != null) { int temporary = pipeline.GetTemporaryRT(); context.SetTarget0(temporary); } if (Properties.visualizeFocus != false) { commandBuffer.SetRenderTarget( context.target0, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare); pipeline.DrawFill(commandBuffer, material, 7); } else { var alphaDepthTarget = new RenderTargetIdentifier(kShaderPropertyAlphaDepthTarget); commandBuffer.GetTemporaryRT(kShaderPropertyAlphaDepthTarget, -1, -1, 0, FilterMode.Bilinear, RenderTextureFormat.ARGB32); commandBuffer.SetRenderTarget( alphaDepthTarget, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare); commandBuffer.SetGlobalTexture(ShaderProperty.MainTex, context.source0); pipeline.DrawFill(commandBuffer, material, 0); int pass = (Properties.blurQuality == BlurQuality.kLow)? 2 : 3; if (Properties.highResolution != false) { commandBuffer.SetRenderTarget( context.target0, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare); commandBuffer.SetGlobalTexture(ShaderProperty.MainTex, alphaDepthTarget); pipeline.SetViewport(commandBuffer, nextProcess); pipeline.DrawFill(commandBuffer, material, pass); } else { int lowWidth = pipeline.ScreenWidth >> 1; int lowHeight = pipeline.ScreenHeight >> 1; var lowBlurTarget = new RenderTargetIdentifier(kShaderPropertyLowBlurTarget); var lowDiscTarget = new RenderTargetIdentifier(kShaderPropertyLowDiscTarget); commandBuffer.GetTemporaryRT(kShaderPropertyLowBlurTarget, lowWidth, lowHeight, 0, FilterMode.Bilinear, RenderTextureFormat.ARGB32); commandBuffer.GetTemporaryRT(kShaderPropertyLowDiscTarget, lowWidth, lowHeight, 0, FilterMode.Bilinear, RenderTextureFormat.ARGB32); commandBuffer.SetRenderTarget( lowBlurTarget, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare); commandBuffer.SetGlobalTexture(ShaderProperty.MainTex, alphaDepthTarget); pipeline.DrawFill(commandBuffer, material, 1); commandBuffer.SetRenderTarget( lowDiscTarget, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare); commandBuffer.SetGlobalTexture(ShaderProperty.MainTex, lowBlurTarget); pipeline.DrawFill(commandBuffer, material, pass); switch (Properties.blurQuality) { case BlurQuality.kMedium: { pass = 5; break; } case BlurQuality.kHigh: { pass = 6; break; } default: { pass = 4; break; } } commandBuffer.SetRenderTarget( context.target0, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.Store, RenderBufferLoadAction.DontCare, RenderBufferStoreAction.DontCare); commandBuffer.SetGlobalTexture(ShaderProperty.MainTex, alphaDepthTarget); commandBuffer.SetGlobalTexture(kShaderPropertyLowRez, lowDiscTarget); pipeline.SetViewport(commandBuffer, nextProcess); pipeline.DrawFill(commandBuffer, material, pass); commandBuffer.ReleaseTemporaryRT(kShaderPropertyLowBlurTarget); commandBuffer.ReleaseTemporaryRT(kShaderPropertyLowDiscTarget); } commandBuffer.ReleaseTemporaryRT(kShaderPropertyAlphaDepthTarget); } context.duplicated = false; return(true); }
public MockImportContext(SourceContext source, TargetContext target) : base(source, target) { }
public BusinessLeadController(TargetContext context) { db = context; }
public Canvas.ResolvedContext AcquireRegion(Size dimensions, Canvas target) { Rectangle region; if(!Region.Contains(new Rectangle(Region.Location, dimensions))) { return null; } ComputeOffsetRegion(dimensions, out region); TargetContext context = new TargetContext(target, region, this); Contract.Assert(!_CanvasContext.IsAlive); _CanvasContext.Target = context; return context; }
public FinanceController(TargetContext context) { db = context; }
public void OnEnable() { _context = new TargetContext(this.transform, _targets, _workedHexInfos, _oil, _wood, _water, _food); }