protected override void Initialize() { var component = new CursorComponent() .Subscribe(PrintYellow) .Subscribe(Beep); AddComponent(component); }
public void updateUIComponent(CursorComponent uc) { activeUIComponent = uc; aoc = new AnimatorOverrideController(anim.runtimeAnimatorController); var l = new List <KeyValuePair <AnimationClip, AnimationClip> >(); if (activeUIComponent.anim) { l.Add(new KeyValuePair <AnimationClip, AnimationClip>(aoc.animationClips[0], activeUIComponent.anim)); } else { l.Add(new KeyValuePair <AnimationClip, AnimationClip>(aoc.animationClips[0], blank.animationClips[0])); } aoc.ApplyOverrides(l); anim.runtimeAnimatorController = aoc; }
public override void Enter(BezierSpawner spawner, CursorComponent cursorComp) { base.Enter(spawner, cursorComp); this.cursorIcon = cursorComp.redIcon; SetStateCursor(); }
public virtual void Enter(BezierSpawner spawner, CursorComponent cursorComp) { this.spawner = spawner; this.cursorComp = cursorComp; }