Пример #1
0
    public void BindView(IObjectView view)
    {
        objView = view;
        var type = view.GetType();
        //if (type == typeof(EffectView))
        //{
        //    viewType = ViewType.Effect;
        //}
        //else if (type == typeof(BulletView))
        //{
        //    viewType = ViewType.Bullet;
        //}
        var _objView = objView as ObjectView;

        _objView.viewObject = this;
        _objView.gameObject = gameObject;
    }
Пример #2
0
        public void BindView(IObjectView view)
        {
            objView = view;
            var type = view.GetType();

            if (type == typeof(EffectView))
            {
                viewType = ViewType.Effect;
            }
            else if (type == typeof(BulletView))
            {
                viewType = ViewType.Bullet;
            }
            var _objView = objView as ObjectView;

            _objView.viewObject = this;
            _objView.transform  = transform;
            _objView.gameObject = gameObject;
        }