Elin Modding Docs Doc
Loading...
Searching...
No Matches
AI_Paint.cs
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5// Token: 0x020001F8 RID: 504
6public class AI_Paint : AIAct
7{
8 // Token: 0x06000E73 RID: 3699 RVA: 0x0006D278 File Offset: 0x0006B478
9 public bool IsValidTarget()
10 {
11 return true;
12 }
13
14 // Token: 0x06000E74 RID: 3700 RVA: 0x0006D27B File Offset: 0x0006B47B
15 public override IEnumerable<AIAct.Status> Run()
16 {
17 bool isCamera = this.painter.PaintType == TraitPainter.Type.Camera;
18 if (this.painter.ExistsOnMap)
19 {
20 this.owner.LookAt(this.painter.owner);
21 }
22 Progress_Custom progress_Custom = new Progress_Custom();
23 progress_Custom.canProgress = (() => this.IsValidTarget());
24 progress_Custom.onProgressBegin = delegate()
25 {
26 };
27 progress_Custom.onProgress = delegate(Progress_Custom p)
28 {
29 this.owner.PlaySound(isCamera ? "camera" : this.painter.owner.material.GetSoundImpact(null), 1f, true);
30 this.painter.owner.renderer.PlayAnime(AnimeID.Shiver, default(Vector3), false);
31 };
32 progress_Custom.onProgressComplete = delegate()
33 {
34 Thing thing = this.canvas.owner.Split(1);
35 thing.c_textureData = this.data;
36 thing.isModified = true;
37 EClass.pc.TryHoldCard(thing, -1, false);
38 };
39 Progress_Custom seq = progress_Custom.SetDuration(isCamera ? 2 : 10, 2);
40 yield return base.Do(seq, null);
41 yield break;
42 }
43
44 // Token: 0x04000D4D RID: 3405
45 public TraitPainter painter;
46
47 // Token: 0x04000D4E RID: 3406
48 public TraitCanvas canvas;
49
50 // Token: 0x04000D4F RID: 3407
51 public byte[] data;
52}
Definition AIAct.cs:7
Definition Thing.cs:10