public BipedalPatrol(UiEnemyFSM fsm, Vector3 pointA, Vector3 pointB) : base(fsm) { PointA = pointA; PointB = pointB; Current = State.PointA; Motion = new UiMotion(this); Motion.Movement.IsConstant = true; }
public UiPlayerMovement(IUiPlayer uiPlayer) { UiPlayer = uiPlayer; Parameters = uiPlayer.Parameters; Input = uiPlayer.Input; Rigidbody2D = uiPlayer.Rigidbody2D; Motion = new UiMotion(this); }
public BipedalPatrol(UiEnemyFSM fsm, Vector3 pointA, Vector3 pointB) : base(fsm) { PointA = pointA; PointB = pointB; Animator = Fsm.Handler.MonoBehaviour.GetComponent <Animator>(); SpriteRenderer = Fsm.Handler.MonoBehaviour.GetComponent <SpriteRenderer>(); Current = State.PointA; Motion = new UiMotion(this); Motion.Movement.IsConstant = true; }
public Animations(UiElevator handler, UiElevatorStop[] stops) { Handler = handler; Lights = Handler.GetComponentInChildren <FadeComponent>(); Motion = new UiMotion(this); Motion.Movement.SetThreshold(Threshold); Stops = new Dictionary <RoomId, Transform>(); foreach (var stop in stops) { Stops.Add(stop.Id, stop.Position); } }
//-------------------------------------------------------------------------------------------------------------- #region Initialization and Unity Callbacks void Awake() { Data = GetComponent <IUiCharacterData>(); //components MyTransform = transform; MyCollider = GetComponent <Collider>(); MyRigidbody = GetComponent <Rigidbody>(); MyInput = GetComponent <IMouseInput>(); MyRenderer = GetComponentInChildren <SpriteRenderer>(); //transform Motion = new UiMotion(this); //fsm Fsm = new UiCharacterFsm(MainCamera, parameters, this); }
void Awake() { //data Data = GetComponent <IUiCardData>(); //components MyTransform = transform; MyCollider = GetComponent <Collider>(); MyRigidbody = GetComponent <Rigidbody>(); MyInput = GetComponent <IMouseInput>(); MyRenderers = GetComponentsInChildren <SpriteRenderer>(); MyRenderer = GetComponent <SpriteRenderer>(); MyMRenderers = GetComponentsInChildren <MeshRenderer>(); MyMRenderer = GetComponent <MeshRenderer>(); //transform Motion = new UiMotion(this); ; //fsm Fsm = new UiCardHandFsm(MainCamera, cardConfigsParameters, this); }
//-------------------------------------------------------------------------------------------------------------- #region Initialization and Unity Callbacks private void Awake() { //data //Data = GetComponent<IJewelData>(); UIRuntimeData = GetComponent <IUiJewelData>(); //components MyTransform = transform; MyCollider = GetComponent <Collider>(); MyRigidbody = GetComponent <Rigidbody>(); MyInput = GetComponent <IMouseInput>(); MyRenderers = GetComponentsInChildren <SpriteRenderer>(); MyRenderer = GetComponent <SpriteRenderer>(); MyMRenderers = GetComponentsInChildren <MeshRenderer>(); MyMRenderer = GetComponent <MeshRenderer>(); MyClickListener = GetComponent <IUiJewelClickListener>(); MyBoxCollider = GetComponent <BoxCollider2D>(); UiJewelClickListener = GetComponent <IUiJewelClickListener>(); //transform Motion = new UiMotion(this); //fsm Fsm = new UiJewelBoardFsm(MainCamera, jewelConfigParameters, this); UIJewelComponentUtility.Format(this, jewelConfigParameters); UIJewelSprite = new UIJewelSprite(this); UIJewelTransform = new UIJewelTransform(this); UiJewelOpacity = new UiJewelOpacity(this); UiJewelBoxCollider = new UIJewelBoxCollider(this); UiJewelDestroy = new UIJewelDestroy(this); UiJewelPosition = new UIJewelPosition(this); //MyClickListener.Init(this); //MyClickListener UIRuntimeData.OnSetData += UiJewelClickListener.Execute; UIRuntimeData.OnSetData += (IRuntimeJewel jwl) => { Debug.Log("Jwl OnSetData:" + jwl.Data.JewelID); }; }
private void Awake() { Renderers = GetComponentsInChildren <SpriteRenderer>(); GetComponent <BoxCollider2D>().size = parameters.UiCardSize.Value; Motion = new UiMotion(this); }
protected override void OnAwake() { Motion = new UiMotion(this); Motion.Movement.IsConstant = false; }
void Awake() { Text = GetComponent <TextMeshPro>(); Motion = new UiMotion(this); Motion.Movement.OnFinishMotion += Finish; }
protected override void OnAwake() { Motion = new UiMotion(this); }