Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     foreach (Transform child in transform)
     {
         if (child.TryGetComponent(out EventCollider eventcollider))
         {
             _event = eventcollider;
             break;
         }
     }
     _move   = gameObject.GetComponent <CharController>();
     _action = GetComponent <CharAction>();
     _state  = CharState.NOMAL;
     _action.Play();
 }
Ejemplo n.º 2
0
        internal virtual void Initial(FakeStruct mod)
        {
            if (mod == null)
            {
                collider = new UIBoxCollider();
                return;
            }
            FakeStruct fs = null;

            unsafe
            {
                fs = UITransfromLoader.GetEventData(mod);
            }
            if (fs == null)
            {
                collider = new UIBoxCollider();
            }
            else
            {
                switch ((EventColliderType)fs[0])
                {
                case EventColliderType.Circle:
                    collider = new UICircleCollider();
                    collider.Initial(fs);
                    break;

                case EventColliderType.Polygon:
                    collider = new UIPolygonCollider();
                    collider.Initial(fs);
                    break;

                default:
                    collider = new UIBoxCollider();
                    break;
                }
            }
        }
Ejemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     _eventCollider = gameObject.GetComponent <EventCollider>();
 }