Пример #1
0
        public async Task DeleteObject(FollowingObject o)
        {
            var r = o.DbRecord;

            r.UserProfile         = null;
            r.FollowedUserProfile = null;
            dbSet.Remove(r);
            await db.SaveChangesAsync();
        }
    public void resetFocus(FollowingObject obj)
    {
        focus            = obj.Focus;
        focusCamDeltaPos = Quaternion.Inverse(focus.rotation) * (obj.CameraPosition.position - focus.position);
        mouseDeltaRot    = Quaternion.identity;
        Vector3 camRotation = Quaternion.LookRotation(-focusCamDeltaPos, Vector3.up).eulerAngles;

        init_xAngle = camRotation.x;
        init_yAngle = camRotation.y;
        resetFocus();
    }
Пример #3
0
 public async Task UpdateObject(FollowingObject o)
 {
     dbSet.Update(o.DbRecord);
     await db.SaveChangesAsync();
 }
Пример #4
0
    // Start is called before the first frame update
    void Start()
    {
        rootFollower = rotationRoot.GetComponent <FollowingObject>();

        navMeshAgent = this.gameObject.GetComponent <NavMeshAgent>();
    }
Пример #5
0
 void Start()
 {
     playerController = Player.GetComponent <PlayerController>();
     shipController   = Ship.GetComponent <ShipController>();
     followingCamera  = mainCamera.GetComponent <FollowingObject>();
 }