Exemplo n.º 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);
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
 private void Awake()
 {
     // 同一階層前提
     m_view  = GetComponent <CharaView>();
     m_model = GetComponent <CharaModel>();
 }