Example #1
0
        public EntityFactory viewWodi8(string imgPath)
        {
            var body = this.entity.get <Body>();

            CharaView.wodi8(this.entity, this.posUtil, this.content.LoadTexture(imgPath), body.pos, body.facing);
            return(this);
        }
Example #2
0
        public static void updateEntityVisibility <TFov>(Entity entity, CharaView view, TFov fov) where TFov : class, iFovRead, iFovWrite, iFovDiff
        {
            if (view == null)
            {
                return;
            }
            var pos = entity.get <Body>().pos;

            if (fov.canSee(pos.x, pos.y))
            {
                view.SetEnabled(true);
            }
            else
            {
                view.SetEnabled(false);
            }
        }
 private void Awake()
 {
     // 同一階層前提
     m_view  = GetComponent <CharaView>();
     m_model = GetComponent <CharaModel>();
 }