Example #1
0
 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;
 }
Example #2
0
 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);
                }
            }
Example #5
0
        //--------------------------------------------------------------------------------------------------------------

        #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);
        }
Example #6
0
        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);
        }
Example #7
0
        //--------------------------------------------------------------------------------------------------------------

        #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); };
        }
Example #8
0
 private void Awake()
 {
     Renderers = GetComponentsInChildren <SpriteRenderer>();
     GetComponent <BoxCollider2D>().size = parameters.UiCardSize.Value;
     Motion = new UiMotion(this);
 }
Example #9
0
 protected override void OnAwake()
 {
     Motion = new UiMotion(this);
     Motion.Movement.IsConstant = false;
 }
Example #10
0
 void Awake()
 {
     Text   = GetComponent <TextMeshPro>();
     Motion = new UiMotion(this);
     Motion.Movement.OnFinishMotion += Finish;
 }
Example #11
0
 protected override void OnAwake()
 {
     Motion = new UiMotion(this);
 }