void Start() { Type.Init(); Globals.Init(); SheetFuncs.LoadSheets(); Obj.Prototype.Init(); for (int i = 0; i < Grid.grids.Count; i++) { Grid.grids[i].Init(); } }
public void StartAnimation(Animation anim) { if (anim.mat.type != currentMaterial.type) { meshRenderer.material = anim.mat.material; } currentAnimation = anim; currentMaterial = anim.mat; currentFrame = 0; time = Timer.time; Frame frame = currentAnimation.frames[0]; SheetFuncs.SetTexture(frame.x, frame.y, frame.width, frame.height, filter); }
public static Obj.Prototype Parcel() { Obj.Prototype p; p.type = Builtins.Parcel; p.height = 0.2f; p.layer = GridLayer.Top; p.animations = new List <Anim.Animation>(); Anim.Animation anim = new Anim.Animation(); anim.type = Builtins.Stand; anim.mat = SheetFuncs.Find(Builtins.sheet); anim.frames = new List <Anim.Frame>(); Anim.Frame f; f.x = 0; f.y = 1; f.width = 75; f.height = 75; f.time = -1; anim.frames.Add(f); p.animations.Add(anim); return(p); }